From 303a6928ab07087482e3dad708a6486d6c156d25 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 23 Jun 2016 09:26:21 +0200 Subject: [PATCH] Changed pointEditorUpdate to editModifiedSelection. --- pcbnew/tools/common_actions.cpp | 8 ++++---- pcbnew/tools/common_actions.h | 6 +++--- pcbnew/tools/edit_tool.cpp | 10 +++++----- pcbnew/tools/point_editor.cpp | 3 +-- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 4d52d39043..b9af35915a 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -138,6 +138,10 @@ TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_EDIT_ITEM ), _( "Properties..." ), _( "Displays item properties dialog" ), editor_xpm ); +TOOL_ACTION COMMON_ACTIONS::editModifiedSelection( "pcbnew.InteractiveEdit.ModifiedSelection", + AS_GLOBAL, 0, + "", "" ); + // Drawing tool actions TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", @@ -564,10 +568,6 @@ TOOL_ACTION COMMON_ACTIONS::routerInlineDrag( "pcbnew.InteractiveRouter.InlineDr "", "" ); // Point editor -TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", - AS_GLOBAL, 0, - "", "" ); // No description, it is not supposed to be shown anywhere - TOOL_ACTION COMMON_ACTIONS::pointEditorAddCorner( "pcbnew.PointEditor.addCorner", AS_GLOBAL, 0, _( "Create corner" ), _( "Create corner" ), add_corner_xpm ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 3f69ac20a6..962b6b436f 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -79,6 +79,9 @@ public: /// Activation of the edit tool static TOOL_ACTION properties; + /// Modified selection notification + static TOOL_ACTION editModifiedSelection; + /// Activation of the exact move tool static TOOL_ACTION moveExact; @@ -161,9 +164,6 @@ public: static TOOL_ACTION routerInlineDrag; // Point Editor - /// Update edit points - static TOOL_ACTION pointEditorUpdate; - /// Break outline (insert additional points to an edge) static TOOL_ACTION pointEditorAddCorner; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index b7c06a7d40..ef1288ee11 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -248,7 +248,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) } selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); + m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true ); } // Dispatch TOOL_ACTIONs @@ -379,7 +379,7 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) // Display properties dialog provided by the legacy canvas frame editFrame->OnEditItemRequest( NULL, item ); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); + m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true ); item->SetFlags( flags ); } @@ -417,7 +417,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); // TODO selectionModified - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); + m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true ); return 0; } @@ -448,7 +448,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent ) if( unselect ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); + m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true ); return 0; } @@ -517,7 +517,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent ) if( unselect ) m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); - m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true ); + m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true ); } return 0; diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 0386c6d50c..48705ae7cc 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -319,8 +319,7 @@ int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent ) updatePoints(); } - // TODO necessary? - else if( evt->IsAction( &COMMON_ACTIONS::pointEditorUpdate ) ) + else if( evt->IsAction( &COMMON_ACTIONS::editModifiedSelection ) ) { updatePoints(); }