mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-02 00:26:45 +00:00
Make tool framework assert more useful
This commit is contained in:
parent
c18bc2472b
commit
9e9db8bd4d
@ -79,7 +79,8 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction )
|
||||
wxASSERT( aAction->GetName().find( '.', 0 ) != std::string::npos );
|
||||
|
||||
// TOOL_ACTIONs must have unique names & ids
|
||||
wxASSERT( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end() );
|
||||
wxASSERT_MSG( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end(),
|
||||
wxString::Format( "Action '%s' already registered", aAction->m_name ) );
|
||||
|
||||
m_actionNameIndex[aAction->m_name] = aAction;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user