Cleanup. Relabeled block zoom command.
This commit is contained in:
parent
48858c30c4
commit
a015ff2ab4
|
@ -237,8 +237,7 @@ void AddMenusForBlock(wxMenu * PopMenu, WinEDA_LibeditFrame * frame)
|
|||
ADD_MENUITEM(PopMenu, ID_POPUP_LIBEDIT_CANCEL_EDITING, _("Cancel Block"), cancel_xpm);
|
||||
|
||||
if ( frame->GetScreen()->BlockLocate.m_Command == BLOCK_MOVE )
|
||||
ADD_MENUITEM(PopMenu, ID_POPUP_ZOOM_BLOCK,
|
||||
_("Win. Zoom (Midd butt drag mouse)"), zoom_selected_xpm);
|
||||
ADD_MENUITEM(PopMenu, ID_POPUP_ZOOM_BLOCK, _("Zoom Block (drag middle mouse)"), zoom_selected_xpm);
|
||||
|
||||
PopMenu->AppendSeparator();
|
||||
|
||||
|
|
|
@ -640,7 +640,7 @@ void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame )
|
|||
|
||||
if( frame->GetScreen()->BlockLocate.m_Command == BLOCK_MOVE )
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_ZOOM_BLOCK,
|
||||
_( "Win. Zoom (Midd butt drag mouse)" ), zoom_selected_xpm );
|
||||
_( "Zoom Block (drag middle mouse)" ), zoom_selected_xpm );
|
||||
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), apply_xpm );
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
bool WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu )
|
||||
/********************************************************************************/
|
||||
|
||||
/* Prepare le menu PullUp affiché par un click sur le bouton droit
|
||||
* de la souris.
|
||||
* Ce menu est ensuite complété par la liste des commandes de ZOOM
|
||||
/* Prepare the right-click pullup menu.
|
||||
* The menu already has a list of zoom commands.
|
||||
*/
|
||||
{
|
||||
EDA_BaseStruct* DrawStruct = GetScreen()->GetCurItem();
|
||||
|
@ -49,7 +48,7 @@ bool WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
|
|||
if( BlockActive )
|
||||
{
|
||||
PopMenu->Append( ID_POPUP_CANCEL_CURRENT_COMMAND, _( "Cancel Block" ) );
|
||||
PopMenu->Append( ID_POPUP_ZOOM_BLOCK, _( "Zoom Block (Midd butt drag)" ) );
|
||||
PopMenu->Append( ID_POPUP_ZOOM_BLOCK, _( "Zoom Block (drag middle mouse)" ) );
|
||||
PopMenu->AppendSeparator();
|
||||
PopMenu->Append( ID_POPUP_PLACE_BLOCK, _( "Place Block" ) );
|
||||
PopMenu->Append( ID_POPUP_COPY_BLOCK, _( "Copy Block (shift mouse)" ) );
|
||||
|
|
|
@ -215,7 +215,7 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
|
|||
ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND,
|
||||
_( "Cancel Block" ), cancel_xpm );
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_ZOOM_BLOCK,
|
||||
_( "Zoom Block (Midd butt drag)" ), zoom_selected_xpm );
|
||||
_( "Zoom Block (drag middle mouse)" ), zoom_selected_xpm );
|
||||
PopMenu->AppendSeparator();
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_PLACE_BLOCK,
|
||||
_( "Place Block" ), apply_xpm );
|
||||
|
|
|
@ -483,7 +483,7 @@ void WinEDA_PcbFrame::createPopUpBlockMenu( wxMenu* menu )
|
|||
ADD_MENUITEM( menu, ID_POPUP_CANCEL_CURRENT_COMMAND,
|
||||
_( "Cancel Block" ), cancel_xpm );
|
||||
ADD_MENUITEM( menu, ID_POPUP_ZOOM_BLOCK,
|
||||
_( "Zoom Block (Midd butt drag)" ), zoom_selected_xpm );
|
||||
_( "Zoom Block (drag middle mouse)" ), zoom_selected_xpm );
|
||||
menu->AppendSeparator();
|
||||
ADD_MENUITEM( menu, ID_POPUP_PLACE_BLOCK,
|
||||
_( "Place Block" ), apply_xpm );
|
||||
|
|
|
@ -120,7 +120,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
|
|||
|
||||
/** Compute the zoom factor and the new draw offset to draw the
|
||||
* selected area (Rect) in full window screen
|
||||
* @param Rect = selected area th show after zooming
|
||||
* @param Rect = selected area to show after zooming
|
||||
*/
|
||||
{
|
||||
int ii, jj;
|
||||
|
@ -130,7 +130,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
|
|||
/* Compute the best zoom */
|
||||
Rect.Normalize();
|
||||
size = DrawPanel->GetClientSize();
|
||||
// Overestimate zoom level, i. e. show more than selected rather than less.
|
||||
// Use ceil to at least show the full rect
|
||||
ii = static_cast<int>( ceil(1.0 * Rect.GetSize().x / size.x) );
|
||||
jj = static_cast<int>( ceil(1.0 * Rect.GetSize().y / size.y) );
|
||||
bestzoom = MAX( ii, jj );
|
||||
|
|
Loading…
Reference in New Issue