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