Commit 42f97b4d authored by charras's avatar charras

Fixed zoom issues with F1 and F2 hot keys

parent 636eace7
...@@ -203,26 +203,26 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -203,26 +203,26 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
*/ */
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
* zoom in and out from hotkeys are equivalent to the pop up menu zoom
* From here, zoomming is made around the screen center
* From hotkeys, zoomming is made around the mouse cursor position
* (obvioulsy not possible from the toolbat or menubar command)
*
* in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
* for Zoom in and Zoom out sub menus
*/
/* Zoom in */ /* Zoom in */
#if !defined( __WXMAC__) text =_( "Zoom In" );
text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr, HK_ZOOM_IN);
#else
text = _( "Zoom In\tCtrl++" );
#endif
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom In" ), item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom In" ),
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_in_xpm ); item->SetBitmap( zoom_in_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* Zoom out */ /* Zoom out */
#if !defined( __WXMAC__) text = _( "Zoom Out" );
text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr,
HK_ZOOM_OUT );
#else
text = _( "Zoom Out\tCtrl+-" );
#endif /* !defined( __WXMAC__) */
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ), item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ),
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_out_xpm ); item->SetBitmap( zoom_out_xpm );
......
/* Hershey fonts */
/* This distribution of the Hershey Fonts may be used by anyone for
* any purpose, commercial or otherwise, providing that:
* 1. The following acknowledgements must be distributed with
* the font data:
* - The Hershey Fonts were originally created by Dr.
* A. V. Hershey while working at the U. S.
* National Bureau of Standards.
* - The format of the Font data in this distribution
* was originally created by
* James Hurt
* Cognition, Inc.
* 900 Technology Park Drive
* Billerica, MA 01821
* (mit-eddie!ci-dandelion!hurt)
* 2. The font data in this distribution may be converted into
* any other format *EXCEPT* the format distributed by
* the U.S. NTIS (which organization holds the rights
* to the distribution and use of the font data in that
* particular format). Not that anybody would really
* *want* to use their format... each point is described
* in eight bytes as "xxx yyy:", where xxx and yyy are
* the coordinate values as ASCII numbers.
*/
/*
* Hershey fonts are vectored fonts.
* Note one can find many formats for these vectored fonts
* here is the format used :
* >shapes are a set of polygons.
* >A given shape includes one or more polygons.
* >corner coordinates are coded by a XY pair.
* >The value of each coordinate is <ascii code> - 'R'
* >The coordinate (-50,0) or " R" is the Pen Up command (end of the current polygon)
*/
#include "HersheySimplexRoman_sans_normal.h"
...@@ -306,27 +306,26 @@ void WinEDA_PcbFrame::ReCreateMenuBar() ...@@ -306,27 +306,26 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
*/ */
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
* zoom in and out from hotkeys are equivalent to the pop up menu zoom
* From here, zoomming is made around the screen center
* From hotkeys, zoomming is made around the mouse cursor position
* (obvioulsy not possible from the toolbat or menubar command)
*
* in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
* for Zoom in and Zoom out sub menus
*/
/* Zoom in */ /* Zoom in */
#if !defined( __WXMAC__) text = _( "Zoom In" );
text = AddHotkeyName( _( "Zoom In" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_IN );
#else
text = _( "Zoom In\tCtrl++" );
#endif
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom In" ), item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom In" ),
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_in_xpm ); item->SetBitmap( zoom_in_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* Zoom out */ /* Zoom out */
#if !defined( __WXMAC__) text = _( "Zoom out" );
text = AddHotkeyName( _( "Zoom out" ), s_Pcbnew_Editor_Hokeys_Descr,
HK_ZOOM_OUT );
#else
text = _( "Zoom Out\tCtrl+-" );
#endif
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ), item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom Out" ),
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_out_xpm ); item->SetBitmap( zoom_out_xpm );
......
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