Browse Source

Added assertion to KeyPressMappingSet to catch attempts to connect keys to non-existent command ID.

tags/2021-05-28
jules 11 years ago
parent
commit
6ff34a841f
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp

+ 6
- 0
modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp View File

@@ -81,6 +81,12 @@ void KeyPressMappingSet::addKeyPress (const CommandID commandID, const KeyPress&
mappings.add (cm);
sendChangeMessage();
}
else
{
// If you hit this, you're trying to attach a keypress to a command ID that
// doesn't exist, so the key is not being attached.
jassertfalse;
}
}
}
}


Loading…
Cancel
Save