Loading pcbnew/tools/common_actions.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", AS_GLOBAL, 0, "Draw an arc", "Draw an arc" ); TOOL_ACTION COMMON_ACTIONS::drawText( "pcbnew.InteractiveDrawing.text", TOOL_ACTION COMMON_ACTIONS::placeText( "pcbnew.InteractiveDrawing.text", AS_GLOBAL, 0, "Add a text", "Add a text" ); Loading Loading @@ -281,7 +281,7 @@ std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::drawArc.GetName(); case ID_PCB_ADD_TEXT_BUTT: return COMMON_ACTIONS::drawText.GetName(); return COMMON_ACTIONS::placeText.GetName(); case ID_PCB_DIMENSION_BUTT: return COMMON_ACTIONS::drawDimension.GetName(); Loading pcbnew/tools/common_actions.h +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ public: static TOOL_ACTION drawArc; /// Activation of the drawing tool (text) static TOOL_ACTION drawText; static TOOL_ACTION placeText; /// Activation of the drawing tool (dimension) static TOOL_ACTION drawDimension; Loading pcbnew/tools/drawing_tool.cpp +19 −11 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -270,7 +271,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) { TEXTE_PCB* text = NULL; Loading @@ -278,6 +279,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); Loading Loading @@ -325,6 +327,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { // Init the new item attributes text = m_frame->CreateTextePcb( NULL ); if( text == NULL ) continue; Loading Loading @@ -381,6 +384,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -571,6 +575,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); Loading Loading @@ -644,6 +649,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); Loading @@ -659,7 +665,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { if( module ) { m_board->Delete( module ); // it was added by LoadModuleFromLibrary m_board->Delete( module ); // it was added by LoadModuleFromLibrary() module = NULL; preview.Clear(); Loading Loading @@ -755,6 +761,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -930,6 +937,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -1152,10 +1160,10 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); Go( &DRAWING_TOOL::PlaceText, COMMON_ACTIONS::placeText.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); } pcbnew/tools/drawing_tool.h +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public: * Displays a dialog that allows to input text and its settings and then lets the user decide * where to place the text. */ int DrawText( TOOL_EVENT& aEvent ); int PlaceText( TOOL_EVENT& aEvent ); /** * Function DrawDimension() Loading Loading
pcbnew/tools/common_actions.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ TOOL_ACTION COMMON_ACTIONS::drawArc( "pcbnew.InteractiveDrawing.arc", AS_GLOBAL, 0, "Draw an arc", "Draw an arc" ); TOOL_ACTION COMMON_ACTIONS::drawText( "pcbnew.InteractiveDrawing.text", TOOL_ACTION COMMON_ACTIONS::placeText( "pcbnew.InteractiveDrawing.text", AS_GLOBAL, 0, "Add a text", "Add a text" ); Loading Loading @@ -281,7 +281,7 @@ std::string COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::drawArc.GetName(); case ID_PCB_ADD_TEXT_BUTT: return COMMON_ACTIONS::drawText.GetName(); return COMMON_ACTIONS::placeText.GetName(); case ID_PCB_DIMENSION_BUTT: return COMMON_ACTIONS::drawDimension.GetName(); Loading
pcbnew/tools/common_actions.h +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ public: static TOOL_ACTION drawArc; /// Activation of the drawing tool (text) static TOOL_ACTION drawText; static TOOL_ACTION placeText; /// Activation of the drawing tool (dimension) static TOOL_ACTION drawDimension; Loading
pcbnew/tools/drawing_tool.cpp +19 −11 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -270,7 +271,7 @@ int DRAWING_TOOL::DrawArc( TOOL_EVENT& aEvent ) } int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) int DRAWING_TOOL::PlaceText( TOOL_EVENT& aEvent ) { TEXTE_PCB* text = NULL; Loading @@ -278,6 +279,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); Loading Loading @@ -325,6 +327,7 @@ int DRAWING_TOOL::DrawText( TOOL_EVENT& aEvent ) { // Init the new item attributes text = m_frame->CreateTextePcb( NULL ); if( text == NULL ) continue; Loading Loading @@ -381,6 +384,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -571,6 +575,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent ) m_view->Add( &preview ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); Loading Loading @@ -644,6 +649,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); m_controls->SetAutoPan( true ); Loading @@ -659,7 +665,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) { if( module ) { m_board->Delete( module ); // it was added by LoadModuleFromLibrary m_board->Delete( module ); // it was added by LoadModuleFromLibrary() module = NULL; preview.Clear(); Loading Loading @@ -755,6 +761,7 @@ int DRAWING_TOOL::drawSegment( int aShape, bool aContinous ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -930,6 +937,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) KIGFX::VIEW_GROUP preview( m_view ); m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear ); m_controls->ShowCursor( true ); m_controls->SetSnapping( true ); Loading Loading @@ -1152,10 +1160,10 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawLine, COMMON_ACTIONS::drawLine.MakeEvent() ); Go( &DRAWING_TOOL::DrawCircle, COMMON_ACTIONS::drawCircle.MakeEvent() ); Go( &DRAWING_TOOL::DrawArc, COMMON_ACTIONS::drawArc.MakeEvent() ); Go( &DRAWING_TOOL::DrawText, COMMON_ACTIONS::drawText.MakeEvent() ); Go( &DRAWING_TOOL::DrawDimension, COMMON_ACTIONS::drawDimension.MakeEvent() ); Go( &DRAWING_TOOL::DrawZone, COMMON_ACTIONS::drawZone.MakeEvent() ); Go( &DRAWING_TOOL::DrawKeepout, COMMON_ACTIONS::drawKeepout.MakeEvent() ); Go( &DRAWING_TOOL::PlaceText, COMMON_ACTIONS::placeText.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTarget, COMMON_ACTIONS::placeTarget.MakeEvent() ); Go( &DRAWING_TOOL::PlaceModule, COMMON_ACTIONS::placeModule.MakeEvent() ); }
pcbnew/tools/drawing_tool.h +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public: * Displays a dialog that allows to input text and its settings and then lets the user decide * where to place the text. */ int DrawText( TOOL_EVENT& aEvent ); int PlaceText( TOOL_EVENT& aEvent ); /** * Function DrawDimension() Loading