minor fix
This commit is contained in:
parent
28a3e5840f
commit
6292dcba76
|
@ -423,6 +423,8 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
|
|||
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
|
||||
|
||||
m_ID_current_state = id;
|
||||
if( m_VToolBar )
|
||||
m_VToolBar->Refresh( );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -386,14 +386,16 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||
break;
|
||||
|
||||
case HK_ADD_LABEL:
|
||||
// switch to m_ID_current_state = ID_LABEL_BUTT;
|
||||
if( m_ID_current_state != ID_LABEL_BUTT )
|
||||
SetToolID( ID_LABEL_BUTT, wxCURSOR_PENCIL, _( "Add Label" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
break;
|
||||
if( !ItemInEdit )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_LABEL_BUTT;
|
||||
if( m_ID_current_state != ID_LABEL_BUTT )
|
||||
SetToolID( ID_LABEL_BUTT, wxCURSOR_PENCIL, _( "Add Label" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_BEGIN_WIRE:
|
||||
|
||||
/* An item is selected. If edited and not a wire, a new command is not
|
||||
* possible */
|
||||
if( !ItemInEdit && screen->m_BlockLocate.m_State == STATE_NO_BLOCK )
|
||||
|
|
|
@ -532,7 +532,8 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, WinEDA_SchematicFrame* fr
|
|||
PopMenu->AppendSeparator();
|
||||
|
||||
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.
|
||||
if( ( pos.x == Wire->m_Start.x && pos.y == Wire->m_Start.y)
|
||||
|
|
Loading…
Reference in New Issue