Fix zoom to selection in bug in gal canvas.
This commit is contained in:
parent
a763435b59
commit
c8c5b5da07
|
@ -47,7 +47,10 @@ void ZOOM_TOOL::Reset( RESET_REASON aReason )
|
|||
int ZOOM_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
// This method is called both when the zoom tool is activated (on) or deactivated (off)
|
||||
bool zoom_tool_is_on = m_frame->GetToolToggled( ID_ZOOM_SELECTION );
|
||||
wxMenuBar* menu = m_frame->GetMenuBar();
|
||||
|
||||
bool zoom_tool_is_on = m_frame->GetToolToggled( ID_ZOOM_SELECTION ) ||
|
||||
( menu && menu->IsChecked( ID_ZOOM_SELECTION ) );
|
||||
|
||||
if( !zoom_tool_is_on ) // This is a tool deselection: do nothing
|
||||
return 0;
|
||||
|
|
|
@ -238,7 +238,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
|
||||
text = AddHotkeyName( _( "Zoom to Selection" ), m_hotkeysDescrList, HK_ZOOM_SELECTION );
|
||||
|
||||
AddMenuItem( viewMenu, ID_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ) );
|
||||
AddMenuItem( viewMenu, ID_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ), wxITEM_CHECK );
|
||||
|
||||
text = AddHotkeyName( _( "&Redraw" ), m_hotkeysDescrList, HK_ZOOM_REDRAW );
|
||||
AddMenuItem( viewMenu, ID_ZOOM_REDRAW, text,
|
||||
|
|
|
@ -643,7 +643,7 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
|
|||
|
||||
text = AddHotkeyName( _( "Zoom to Selection" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||
HK_ZOOM_SELECTION );
|
||||
AddMenuItem( aParentMenu, ID_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ) );
|
||||
AddMenuItem( aParentMenu, ID_ZOOM_SELECTION, text, KiBitmap( zoom_area_xpm ), wxITEM_CHECK );
|
||||
|
||||
text = AddHotkeyName( _( "&Redraw" ), g_Pcbnew_Editor_Hotkeys_Descr, HK_ZOOM_REDRAW );
|
||||
AddMenuItem( aParentMenu, ID_ZOOM_REDRAW, text,
|
||||
|
|
Loading…
Reference in New Issue