Loading common/drawframe.cpp +20 −16 Original line number Diff line number Diff line Loading @@ -364,29 +364,33 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv ) } /* /** Function SetToolID * Enables the icon of the selected tool in the vertical toolbar. * (Or tool ID_NO_SELECT_BUTT default if no new selection) * if (id >= 0) * @param aId = new m_ID_current_state value (if aId >= 0) * @param aCursor = the new cursor shape (0 = default cursor) * @param aTitle = tool message in status bar * if (aId >= 0) * Updates all variables related: * Message m_ID_current_state, cursor * If (id < 0) * Only updates the variables message and cursor * m_ID_current_state, cursor shape and message in status bar * If (aId < 0) * Only updates the cursor shape and message in status bar * (does not the current m_ID_current_state value */ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, const wxString& title ) void WinEDA_DrawFrame::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) { // Keep default cursor in toolbars SetCursor( wxNullCursor ); // Change Cursor in DrawPanel only if( DrawPanel ) { DrawPanel->m_PanelDefaultCursor = new_cursor_id; DrawPanel->SetCursor( new_cursor_id ); DrawPanel->m_PanelDefaultCursor = aCursor; DrawPanel->SetCursor( aCursor ); } DisplayToolMsg( title ); DisplayToolMsg( aToolMsg ); if( id < 0 ) if( aId < 0 ) return; // Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool. Loading @@ -400,7 +404,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, } else { if( id ) if( aId ) { if( m_VToolBar ) m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE ); Loading @@ -412,18 +416,18 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); } if( id ) if( aId ) { if( m_VToolBar ) m_VToolBar->ToggleTool( id, TRUE ); m_VToolBar->ToggleTool( aId, TRUE ); if( m_AuxVToolBar ) m_AuxVToolBar->ToggleTool( id, TRUE ); m_AuxVToolBar->ToggleTool( aId, TRUE ); } else if( m_VToolBar ) m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); m_ID_current_state = id; m_ID_current_state = aId; if( m_VToolBar ) m_VToolBar->Refresh( ); } Loading gerbview/edit.cpp +259 −261 Original line number Diff line number Diff line Loading @@ -104,13 +104,13 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) GetScreen()->m_BlockLocate.ClearItemsList(); } if( m_ID_current_state == 0 ) SetToolID( 0, wxCURSOR_ARROW, wxEmptyString ); SetToolID( 0, 0, wxEmptyString ); else SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor ); DrawPanel->SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor ); break; default: DrawPanel->UnManageCursor( 0, wxCURSOR_ARROW, wxEmptyString ); DrawPanel->UnManageCursor( 0, 0, wxEmptyString ); break; } Loading Loading @@ -146,7 +146,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_CLOSE_CURRENT_TOOL: SetToolID( 0, wxCURSOR_ARROW, wxEmptyString ); SetToolID( 0, 0, wxEmptyString ); break; case ID_POPUP_CANCEL_CURRENT_COMMAND: Loading @@ -172,8 +172,6 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) gerber_layer->m_Selected_Tool = tool; DrawPanel->Refresh( TRUE ); } else DisplayError( this, _( "No layer selected" ) ); break; case ID_GERBVIEW_SHOW_LIST_DCODES: Loading gerbview/tool_gerber.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -246,7 +246,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) // after adding the buttons to the toolbar, must call Realize() to reflect // the changes m_HToolBar->Realize(); SetToolbars(); } Loading @@ -272,7 +271,6 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void ) _( "Delete items" ) ); m_VToolBar->Realize(); SetToolbars(); } Loading Loading @@ -339,5 +337,4 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void ) m_OptionsToolBar->Realize(); SetToolbars(); } include/class_drawpanel.h +2 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ public: // ignore mouse events bool m_Block_Enable; // TRUE to accept Block Commands // useful to avoid false start block in certain cases // (like switch from a sheet to an other sheet int m_CanStartBlock; // >= 0 (or >= n) if a block can // start bool m_PrintIsMirrored; // True when drawing in mirror Loading @@ -51,8 +53,6 @@ public: // because arcs are oriented, and // in mirror mode, orientations are // reversed // useful to avoid false start block in certain cases (like switch from a // sheet to an other sheet int m_PanelDefaultCursor; // Current mouse cursor default // shape id for this window int m_PanelCursor; // Current mouse cursor shape id Loading include/wxBasePcbFrame.h +1 −2 Original line number Diff line number Diff line Loading @@ -104,8 +104,7 @@ public: virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; virtual void ReCreateMenuBar(); virtual void SetToolID( int id, int new_cursor_id, const wxString& title ); virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg ); virtual void UpdateStatusBar(); PCB_SCREEN* GetScreen() const Loading Loading
common/drawframe.cpp +20 −16 Original line number Diff line number Diff line Loading @@ -364,29 +364,33 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv ) } /* /** Function SetToolID * Enables the icon of the selected tool in the vertical toolbar. * (Or tool ID_NO_SELECT_BUTT default if no new selection) * if (id >= 0) * @param aId = new m_ID_current_state value (if aId >= 0) * @param aCursor = the new cursor shape (0 = default cursor) * @param aTitle = tool message in status bar * if (aId >= 0) * Updates all variables related: * Message m_ID_current_state, cursor * If (id < 0) * Only updates the variables message and cursor * m_ID_current_state, cursor shape and message in status bar * If (aId < 0) * Only updates the cursor shape and message in status bar * (does not the current m_ID_current_state value */ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, const wxString& title ) void WinEDA_DrawFrame::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) { // Keep default cursor in toolbars SetCursor( wxNullCursor ); // Change Cursor in DrawPanel only if( DrawPanel ) { DrawPanel->m_PanelDefaultCursor = new_cursor_id; DrawPanel->SetCursor( new_cursor_id ); DrawPanel->m_PanelDefaultCursor = aCursor; DrawPanel->SetCursor( aCursor ); } DisplayToolMsg( title ); DisplayToolMsg( aToolMsg ); if( id < 0 ) if( aId < 0 ) return; // Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool. Loading @@ -400,7 +404,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, } else { if( id ) if( aId ) { if( m_VToolBar ) m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE ); Loading @@ -412,18 +416,18 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); } if( id ) if( aId ) { if( m_VToolBar ) m_VToolBar->ToggleTool( id, TRUE ); m_VToolBar->ToggleTool( aId, TRUE ); if( m_AuxVToolBar ) m_AuxVToolBar->ToggleTool( id, TRUE ); m_AuxVToolBar->ToggleTool( aId, TRUE ); } else if( m_VToolBar ) m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); m_ID_current_state = id; m_ID_current_state = aId; if( m_VToolBar ) m_VToolBar->Refresh( ); } Loading
gerbview/edit.cpp +259 −261 Original line number Diff line number Diff line Loading @@ -104,13 +104,13 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) GetScreen()->m_BlockLocate.ClearItemsList(); } if( m_ID_current_state == 0 ) SetToolID( 0, wxCURSOR_ARROW, wxEmptyString ); SetToolID( 0, 0, wxEmptyString ); else SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor ); DrawPanel->SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor ); break; default: DrawPanel->UnManageCursor( 0, wxCURSOR_ARROW, wxEmptyString ); DrawPanel->UnManageCursor( 0, 0, wxEmptyString ); break; } Loading Loading @@ -146,7 +146,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_CLOSE_CURRENT_TOOL: SetToolID( 0, wxCURSOR_ARROW, wxEmptyString ); SetToolID( 0, 0, wxEmptyString ); break; case ID_POPUP_CANCEL_CURRENT_COMMAND: Loading @@ -172,8 +172,6 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) gerber_layer->m_Selected_Tool = tool; DrawPanel->Refresh( TRUE ); } else DisplayError( this, _( "No layer selected" ) ); break; case ID_GERBVIEW_SHOW_LIST_DCODES: Loading
gerbview/tool_gerber.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -246,7 +246,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) // after adding the buttons to the toolbar, must call Realize() to reflect // the changes m_HToolBar->Realize(); SetToolbars(); } Loading @@ -272,7 +271,6 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void ) _( "Delete items" ) ); m_VToolBar->Realize(); SetToolbars(); } Loading Loading @@ -339,5 +337,4 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void ) m_OptionsToolBar->Realize(); SetToolbars(); }
include/class_drawpanel.h +2 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ public: // ignore mouse events bool m_Block_Enable; // TRUE to accept Block Commands // useful to avoid false start block in certain cases // (like switch from a sheet to an other sheet int m_CanStartBlock; // >= 0 (or >= n) if a block can // start bool m_PrintIsMirrored; // True when drawing in mirror Loading @@ -51,8 +53,6 @@ public: // because arcs are oriented, and // in mirror mode, orientations are // reversed // useful to avoid false start block in certain cases (like switch from a // sheet to an other sheet int m_PanelDefaultCursor; // Current mouse cursor default // shape id for this window int m_PanelCursor; // Current mouse cursor shape id Loading
include/wxBasePcbFrame.h +1 −2 Original line number Diff line number Diff line Loading @@ -104,8 +104,7 @@ public: virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; virtual void ReCreateMenuBar(); virtual void SetToolID( int id, int new_cursor_id, const wxString& title ); virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg ); virtual void UpdateStatusBar(); PCB_SCREEN* GetScreen() const Loading