Browse Source

Changed pointEditorUpdate to editModifiedSelection.

pull/3/merge
Maciej Suminski 9 years ago
parent
commit
303a6928ab
  1. 8
      pcbnew/tools/common_actions.cpp
  2. 6
      pcbnew/tools/common_actions.h
  3. 10
      pcbnew/tools/edit_tool.cpp
  4. 3
      pcbnew/tools/point_editor.cpp

8
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 ), AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_EDIT_ITEM ),
_( "Properties..." ), _( "Displays item properties dialog" ), editor_xpm ); _( "Properties..." ), _( "Displays item properties dialog" ), editor_xpm );
TOOL_ACTION COMMON_ACTIONS::editModifiedSelection( "pcbnew.InteractiveEdit.ModifiedSelection",
AS_GLOBAL, 0,
"", "" );
// Drawing tool actions // Drawing tool actions
TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line", TOOL_ACTION COMMON_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line",
@ -564,10 +568,6 @@ TOOL_ACTION COMMON_ACTIONS::routerInlineDrag( "pcbnew.InteractiveRouter.InlineDr
"", "" ); "", "" );
// Point editor // 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", TOOL_ACTION COMMON_ACTIONS::pointEditorAddCorner( "pcbnew.PointEditor.addCorner",
AS_GLOBAL, 0, AS_GLOBAL, 0,
_( "Create corner" ), _( "Create corner" ), add_corner_xpm ); _( "Create corner" ), _( "Create corner" ), add_corner_xpm );

6
pcbnew/tools/common_actions.h

@ -79,6 +79,9 @@ public:
/// Activation of the edit tool /// Activation of the edit tool
static TOOL_ACTION properties; static TOOL_ACTION properties;
/// Modified selection notification
static TOOL_ACTION editModifiedSelection;
/// Activation of the exact move tool /// Activation of the exact move tool
static TOOL_ACTION moveExact; static TOOL_ACTION moveExact;
@ -161,9 +164,6 @@ public:
static TOOL_ACTION routerInlineDrag; static TOOL_ACTION routerInlineDrag;
// Point Editor // Point Editor
/// Update edit points
static TOOL_ACTION pointEditorUpdate;
/// Break outline (insert additional points to an edge) /// Break outline (insert additional points to an edge)
static TOOL_ACTION pointEditorAddCorner; static TOOL_ACTION pointEditorAddCorner;

10
pcbnew/tools/edit_tool.cpp

@ -248,7 +248,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
} }
selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true );
} }
// Dispatch TOOL_ACTIONs // Dispatch TOOL_ACTIONs
@ -379,7 +379,7 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
// Display properties dialog provided by the legacy canvas frame // Display properties dialog provided by the legacy canvas frame
editFrame->OnEditItemRequest( NULL, item ); editFrame->OnEditItemRequest( NULL, item );
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true );
item->SetFlags( flags ); item->SetFlags( flags );
} }
@ -417,7 +417,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
// TODO selectionModified // TODO selectionModified
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true );
return 0; return 0;
} }
@ -448,7 +448,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
if( unselect ) if( unselect )
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true );
return 0; return 0;
} }
@ -517,7 +517,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent )
if( unselect ) if( unselect )
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true );
} }
return 0; return 0;

3
pcbnew/tools/point_editor.cpp

@ -319,8 +319,7 @@ int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
updatePoints(); updatePoints();
} }
// TODO necessary?
else if( evt->IsAction( &COMMON_ACTIONS::pointEditorUpdate ) )
else if( evt->IsAction( &COMMON_ACTIONS::editModifiedSelection ) )
{ {
updatePoints(); updatePoints();
} }

Loading…
Cancel
Save