Improve handling of tool bar command IDs.

* Make EDA_DRAW_FRAME current tool ID member variable private.
* Added global no tool selected ID to replace application specific no
  tool selected IDs.
* Change SetToolID to prevent setting the tool ID to anything less than
  the new global no tool selected ID and assert on debug builds.
* Change command and update user interface command event handlers to use
  new global no tool selected ID.
* Fixed schematic library editor add pin hot key handler.
This commit is contained in:
Wayne Stambaugh
2011-02-24 15:22:12 -05:00
parent c303d3f8bd
commit cb647737ee
44 changed files with 200 additions and 280 deletions
+1 -4
View File
@@ -146,9 +146,6 @@ void WinEDA_PcbFrame::OnUpdateSave( wxUpdateUIEvent& aEvent )
void WinEDA_PcbFrame::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent )
{
if( m_ID_current_state == 0 )
m_ID_current_state = ID_PCB_NO_TOOL;
if( aEvent.GetEventObject() == m_VToolBar )
aEvent.Check( m_ID_current_state == aEvent.GetId() );
aEvent.Check( GetToolId() == aEvent.GetId() );
}