Loading pcbnew/tools/point_editor.cpp +20 −14 Original line number Diff line number Diff line Loading @@ -96,6 +96,12 @@ POINT_EDITOR::POINT_EDITOR() : } void POINT_EDITOR::Reset( RESET_REASON aReason ) { m_editPoints.reset(); } bool POINT_EDITOR::Init() { // Find the selection tool, so they can cooperate Loading Loading @@ -130,6 +136,14 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { if( !m_editPoints || evt->IsCancel() || evt->Matches( m_selectionTool->ClearedEvent ) || evt->Matches( m_selectionTool->DeselectedEvent ) || evt->Matches( m_selectionTool->SelectedEvent ) ) { break; } if( evt->IsMotion() ) { EDIT_POINT* point = m_editPoints->FindPoint( evt->Position() ); Loading Loading @@ -168,23 +182,18 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) updatePoints(); } else if( evt->IsCancel() || evt->Matches( m_selectionTool->ClearedEvent ) || evt->Matches( m_selectionTool->DeselectedEvent ) || evt->Matches( m_selectionTool->SelectedEvent ) ) { break; } else { m_toolMgr->PassEvent(); } } if( m_editPoints ) { item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->GetView()->Remove( m_editPoints.get() ); m_editPoints.reset(); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } controls->ShowCursor( false ); Loading Loading @@ -265,9 +274,6 @@ void POINT_EDITOR::updateItem() const void POINT_EDITOR::updatePoints() const { if( !m_editPoints ) return; EDA_ITEM* item = m_editPoints->GetParent(); switch( item->Type() ) Loading pcbnew/tools/point_editor.h +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public: POINT_EDITOR(); /// @copydoc TOOL_INTERACTIVE::Reset() void Reset( RESET_REASON aReason ) {}; void Reset( RESET_REASON aReason ); /// @copydoc TOOL_INTERACTIVE::Init() bool Init(); Loading Loading
pcbnew/tools/point_editor.cpp +20 −14 Original line number Diff line number Diff line Loading @@ -96,6 +96,12 @@ POINT_EDITOR::POINT_EDITOR() : } void POINT_EDITOR::Reset( RESET_REASON aReason ) { m_editPoints.reset(); } bool POINT_EDITOR::Init() { // Find the selection tool, so they can cooperate Loading Loading @@ -130,6 +136,14 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { if( !m_editPoints || evt->IsCancel() || evt->Matches( m_selectionTool->ClearedEvent ) || evt->Matches( m_selectionTool->DeselectedEvent ) || evt->Matches( m_selectionTool->SelectedEvent ) ) { break; } if( evt->IsMotion() ) { EDIT_POINT* point = m_editPoints->FindPoint( evt->Position() ); Loading Loading @@ -168,23 +182,18 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) updatePoints(); } else if( evt->IsCancel() || evt->Matches( m_selectionTool->ClearedEvent ) || evt->Matches( m_selectionTool->DeselectedEvent ) || evt->Matches( m_selectionTool->SelectedEvent ) ) { break; } else { m_toolMgr->PassEvent(); } } if( m_editPoints ) { item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->GetView()->Remove( m_editPoints.get() ); m_editPoints.reset(); item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } controls->ShowCursor( false ); Loading Loading @@ -265,9 +274,6 @@ void POINT_EDITOR::updateItem() const void POINT_EDITOR::updatePoints() const { if( !m_editPoints ) return; EDA_ITEM* item = m_editPoints->GetParent(); switch( item->Type() ) Loading
pcbnew/tools/point_editor.h +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public: POINT_EDITOR(); /// @copydoc TOOL_INTERACTIVE::Reset() void Reset( RESET_REASON aReason ) {}; void Reset( RESET_REASON aReason ); /// @copydoc TOOL_INTERACTIVE::Init() bool Init(); Loading