Commit 6292dcba authored by jean-pierre charras's avatar jean-pierre charras

minor fix

parent 28a3e584
...@@ -423,6 +423,8 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, ...@@ -423,6 +423,8 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
m_ID_current_state = id; m_ID_current_state = id;
if( m_VToolBar )
m_VToolBar->Refresh( );
} }
......
...@@ -386,14 +386,16 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -386,14 +386,16 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break; break;
case HK_ADD_LABEL: case HK_ADD_LABEL:
// switch to m_ID_current_state = ID_LABEL_BUTT; if( !ItemInEdit )
if( m_ID_current_state != ID_LABEL_BUTT ) {
SetToolID( ID_LABEL_BUTT, wxCURSOR_PENCIL, _( "Add Label" ) ); // switch to m_ID_current_state = ID_LABEL_BUTT;
OnLeftClick( DC, MousePos ); if( m_ID_current_state != ID_LABEL_BUTT )
break; SetToolID( ID_LABEL_BUTT, wxCURSOR_PENCIL, _( "Add Label" ) );
OnLeftClick( DC, MousePos );
}
break;
case HK_BEGIN_WIRE: case HK_BEGIN_WIRE:
/* An item is selected. If edited and not a wire, a new command is not /* An item is selected. If edited and not a wire, a new command is not
* possible */ * possible */
if( !ItemInEdit && screen->m_BlockLocate.m_State == STATE_NO_BLOCK ) if( !ItemInEdit && screen->m_BlockLocate.m_State == STATE_NO_BLOCK )
......
...@@ -532,7 +532,8 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, WinEDA_SchematicFrame* fr ...@@ -532,7 +532,8 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, WinEDA_SchematicFrame* fr
PopMenu->AppendSeparator(); PopMenu->AppendSeparator();
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, _( "Add Junction" ), add_junction_xpm ); ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, _( "Add Junction" ), add_junction_xpm );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_LABEL, _( "Add Label" ), add_line_label_xpm ); msg = AddHotkeyName( _( "Add Label" ), s_Schematic_Hokeys_Descr, HK_ADD_LABEL );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ADD_LABEL, msg, add_line_label_xpm );
// Add global label command only if the cursor is over one end of the wire. // Add global label command only if the cursor is over one end of the wire.
if( ( pos.x == Wire->m_Start.x && pos.y == Wire->m_Start.y) if( ( pos.x == Wire->m_Start.x && pos.y == Wire->m_Start.y)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment