Commit a015ff2a authored by diemer's avatar diemer

Cleanup. Relabeled block zoom command.

parent 48858c30
......@@ -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 complt 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)" ) );
......
......@@ -26,7 +26,7 @@ class WinEDA_DrawPanel : public EDA_DRAW_PANEL
public:
int m_Ident;
WinEDA_DrawFrame* m_Parent;
EDA_Rect m_ClipBox; // the clipbox used in screen redraw (usually gives the visible area in internal units)
EDA_Rect m_ClipBox; // the clipbox used in screen redraw (usually gives the visible area in internal units)
wxPoint m_CursorStartPos; // utile dans controles du mouvement curseur
int m_Scroll_unit; // Valeur de l'unite de scroll en pixels pour les barres de scroll
int m_ScrollButt_unit; // Valeur de l'unite de scroll en pixels pour les boutons de scroll
......
......@@ -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 );
......
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