From 730b89af6dbeb1fad5e51f06986d33e05a77b67e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 19 Jun 2019 16:11:41 +0100 Subject: [PATCH] Another round of changes for immediate actions. --- common/eda_draw_frame.cpp | 9 +++ eeschema/tools/lib_drawing_tools.cpp | 40 +++-------- eeschema/tools/sch_drawing_tools.cpp | 72 ++++++-------------- eeschema/tools/sch_line_wire_bus_tool.cpp | 36 ++++------ eeschema/tools/sch_line_wire_bus_tool.h | 2 +- include/eda_draw_frame.h | 6 ++ pagelayout_editor/tools/pl_drawing_tools.cpp | 32 ++------- 7 files changed, 62 insertions(+), 135 deletions(-) diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index 49a85e3fe6..7f0360eb04 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -419,6 +419,15 @@ void EDA_DRAW_FRAME::OnSize( wxSizeEvent& SizeEv ) } +void EDA_DRAW_FRAME::SetTool( const std::string& actionName ) +{ + if( !m_toolStack.empty() ) + m_toolStack.pop_back(); + + PushTool( actionName ); +} + + void EDA_DRAW_FRAME::PushTool( const std::string& actionName ) { m_toolStack.push_back( actionName ); diff --git a/eeschema/tools/lib_drawing_tools.cpp b/eeschema/tools/lib_drawing_tools.cpp index 013213dfae..e0fffdeab9 100644 --- a/eeschema/tools/lib_drawing_tools.cpp +++ b/eeschema/tools/lib_drawing_tools.cpp @@ -69,7 +69,6 @@ bool LIB_DRAWING_TOOLS::Init() int LIB_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) { KICAD_T type = aEvent.Parameter(); - bool immediateMode = aEvent.HasPosition(); LIB_PIN_TOOL* pinTool = type == LIB_PIN_T ? m_toolMgr->GetTool() : nullptr; VECTOR2I cursorPos; EDA_ITEM* item = nullptr; @@ -77,11 +76,11 @@ int LIB_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); getViewControls()->ShowCursor( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); // Prime the pump - if( immediateMode ) + if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -97,15 +96,12 @@ int LIB_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) m_view->ClearPreview(); delete item; item = nullptr; - - if( immediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -191,9 +187,6 @@ int LIB_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) m_frame->RebuildView(); m_frame->OnModify(); - - if( immediateMode ) - break; } } else if( evt->IsClick( BUT_RIGHT ) ) @@ -217,9 +210,6 @@ int LIB_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) getViewControls()->CaptureCursor( item != nullptr ); } - if( immediateMode ) - m_frame->PopTool(); - return 0; } @@ -227,7 +217,6 @@ int LIB_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) int LIB_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) { KICAD_T type = aEvent.Parameter(); - bool immediateMode = aEvent.HasPosition(); // We might be running as the same shape in another co-routine. Make sure that one // gets whacked. @@ -236,14 +225,14 @@ int LIB_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); getViewControls()->ShowCursor( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); LIB_PART* part = m_frame->GetCurPart(); LIB_ITEM* item = nullptr; // Prime the pump - if( immediateMode ) + if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -260,15 +249,12 @@ int LIB_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) { delete item; item = nullptr; - - if( immediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -325,12 +311,7 @@ int LIB_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) m_frame->RebuildView(); m_frame->OnModify(); - - if( immediateMode ) - { - m_toolMgr->RunAction( ACTIONS::activatePointEditor ); - break; - } + m_toolMgr->RunAction( ACTIONS::activatePointEditor ); } } @@ -360,9 +341,6 @@ int LIB_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) getViewControls()->CaptureCursor( item != nullptr ); } - if( immediateMode ) - m_frame->PopTool(); - return 0; } @@ -372,7 +350,7 @@ int LIB_DRAWING_TOOLS::PlaceAnchor( const TOOL_EVENT& aEvent ) getViewControls()->ShowCursor( true ); getViewControls()->SetSnapping( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); // Main loop: keep receiving events @@ -408,7 +386,7 @@ int LIB_DRAWING_TOOLS::PlaceAnchor( const TOOL_EVENT& aEvent ) } } - m_frame->PopTool(); + m_frame->ClearToolStack(); return 0; } diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 2090622a27..c20984a959 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -75,7 +75,6 @@ static SCH_BASE_FRAME::HISTORY_LIST s_PowerHistoryList; int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent ) { SCH_COMPONENT* component = aEvent.Parameter(); - bool immediateMode = component || aEvent.HasPosition(); SCHLIB_FILTER filter; SCH_BASE_FRAME::HISTORY_LIST* historyList = nullptr; @@ -110,7 +109,7 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent ) getViewControls()->WarpCursor( getViewControls()->GetMousePosition( false ) ); m_toolMgr->RunAction( EE_ACTIONS::refreshPreview ); } - else if( immediateMode ) + else if( aEvent.HasPosition() ) m_toolMgr->RunAction( EE_ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -126,15 +125,12 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent ) m_view->ClearPreview(); delete component; component = nullptr; - - if( immediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -181,9 +177,6 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent ) component = nullptr; m_view->ClearPreview(); - - if( immediateMode ) - break; } } else if( evt->IsClick( BUT_RIGHT ) ) @@ -220,9 +213,6 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent ) getViewControls()->CaptureCursor( component != nullptr ); } - if( immediateMode ) - m_frame->PopTool(); - return 0; } @@ -230,9 +220,12 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent ) int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) { SCH_BITMAP* image = aEvent.Parameter(); - bool immediateMode = image || aEvent.HasPosition(); + bool immediateMode = image; - m_frame->PushTool( aEvent.GetCommandStr().get() ); + if( immediateMode ) + m_frame->PushTool( aEvent.GetCommandStr().get() ); + else + m_frame->SetTool( aEvent.GetCommandStr().get() ); VECTOR2I cursorPos = getViewControls()->GetCursorPosition(); @@ -252,7 +245,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) // Prime the pump if( image ) m_toolMgr->RunAction( EE_ACTIONS::refreshPreview ); - else if( immediateMode ) + else if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -276,7 +269,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -365,13 +358,12 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) { - bool immediateMode = aEvent.HasPosition(); wxPoint cursorPos; KICAD_T type = aEvent.Parameter(); if( type == SCH_JUNCTION_T ) { - if( immediateMode ) + if( aEvent.HasPosition() ) { EE_SELECTION& selection = m_selectionTool->GetSelection(); SCH_LINE* wire = dynamic_cast( selection.Front() ); @@ -392,11 +384,11 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) getViewControls()->ShowCursor( true ); getViewControls()->SetSnapping( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); // Prime the pump - if( immediateMode ) + if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -407,7 +399,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) || evt->IsActivate() ) { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } @@ -447,12 +439,6 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) m_frame->TestDanglingEnds(); m_frame->OnModify(); } - - if( immediateMode ) - { - m_frame->PopTool(); - break; - } } else if( evt->IsClick( BUT_RIGHT ) ) { @@ -467,19 +453,18 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) { EDA_ITEM* item = nullptr; - bool immediateMode = aEvent.HasPosition(); bool importMode = aEvent.IsAction( &EE_ACTIONS::importSheetPin ); KICAD_T type = aEvent.Parameter(); m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); getViewControls()->ShowCursor( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); // Prime the pump - if( immediateMode ) + if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -495,15 +480,12 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) m_view->ClearPreview(); delete item; item = nullptr; - - if( immediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -589,9 +571,6 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) item = nullptr; m_view->ClearPreview(); - - if( immediateMode ) - break; } } else if( evt->IsClick( BUT_RIGHT ) ) @@ -628,9 +607,6 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) getViewControls()->CaptureCursor( item != nullptr ); } - if( immediateMode ) - m_frame->PopTool(); - return 0; } @@ -638,17 +614,16 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent ) { SCH_SHEET* sheet = nullptr; - bool immediateMode = aEvent.HasPosition(); m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); getViewControls()->ShowCursor( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); // Prime the pump - if( immediateMode ) + if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -665,15 +640,12 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent ) { delete sheet; sheet = nullptr; - - if( immediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -713,9 +685,6 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent ) } sheet = nullptr; - - if( immediateMode ) - break; } else if( sheet && ( evt->IsAction( &EE_ACTIONS::refreshPreview ) || evt->IsMotion() ) ) @@ -739,9 +708,6 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent ) getViewControls()->CaptureCursor( sheet != nullptr); } - if( immediateMode ) - m_frame->PopTool(); - return 0; } diff --git a/eeschema/tools/sch_line_wire_bus_tool.cpp b/eeschema/tools/sch_line_wire_bus_tool.cpp index c78ce00e60..b8be49984a 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.cpp +++ b/eeschema/tools/sch_line_wire_bus_tool.cpp @@ -253,12 +253,19 @@ bool SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus( const SELECTION& aSelection int SCH_LINE_WIRE_BUS_TOOL::DrawSegments( const TOOL_EVENT& aEvent ) { SCH_LAYER_ID layer = aEvent.Parameter(); + SCH_LINE* segment = nullptr; if( aEvent.HasPosition() ) getViewControls()->WarpCursor( getViewControls()->GetCursorPosition(), true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); - return doDrawSegments( layer, nullptr, aEvent.HasPosition() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); + + if( aEvent.HasPosition() ) + { + VECTOR2D cursorPos = getViewControls()->GetCursorPosition( !aEvent.Modifier( MD_ALT ) ); + segment = startSegments( layer, cursorPos ); + } + return doDrawSegments( layer, segment ); } @@ -306,7 +313,7 @@ int SCH_LINE_WIRE_BUS_TOOL::UnfoldBus( const TOOL_EVENT& aEvent ) // If we have an unfolded wire to draw, then draw it if( segment ) - doDrawSegments( LAYER_WIRE, segment, true ); + doDrawSegments( LAYER_WIRE, segment ); m_frame->PopTool(); return 0; @@ -428,7 +435,7 @@ static void computeBreakPoint( SCH_SCREEN* aScreen, SCH_LINE* aSegment, wxPoint& } -int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment, bool aImmediateMode ) +int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment ) { bool forceHV = m_frame->GetForceHVLines(); SCH_SCREEN* screen = m_frame->GetScreen(); @@ -439,10 +446,6 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment, bool Activate(); - // Prime the pump - if( aImmediateMode && !aSegment ) - m_toolMgr->RunAction( ACTIONS::cursorClick ); - // Main loop: keep receiving events while( TOOL_EVENT* evt = Wait() ) { @@ -472,15 +475,12 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment, bool m_view->ClearPreview(); m_view->ShowPreview( false ); - - if( aImmediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -501,9 +501,6 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment, bool finishSegments(); aSegment = nullptr; } - - if( aImmediateMode ) - break; } //------------------------------------------------------------------------ // Handle click: @@ -533,9 +530,6 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment, bool { finishSegments(); aSegment = nullptr; - - if( aImmediateMode ) - break; } else { @@ -558,9 +552,6 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment, bool finishSegments(); aSegment = nullptr; - - if( aImmediateMode ) - break; } } //------------------------------------------------------------------------ @@ -647,9 +638,6 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment, bool getViewControls()->CaptureCursor( aSegment != nullptr ); } - if( aImmediateMode ) - m_frame->PopTool(); - return 0; } diff --git a/eeschema/tools/sch_line_wire_bus_tool.h b/eeschema/tools/sch_line_wire_bus_tool.h index c1c5a35b24..55d52732a1 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.h +++ b/eeschema/tools/sch_line_wire_bus_tool.h @@ -80,7 +80,7 @@ public: int AddJunctionsIfNeeded( const TOOL_EVENT& aEvent ); private: - int doDrawSegments( int aType, SCH_LINE* aSegment, bool aImmediateMode ); + int doDrawSegments( int aType, SCH_LINE* aSegment ); SCH_LINE* startSegments( int aType, const VECTOR2D& aPos ); SCH_LINE* doUnfoldBus( const wxString& aNet ); void finishSegments(); diff --git a/include/eda_draw_frame.h b/include/eda_draw_frame.h index ea0de2ae3c..a1346564c7 100644 --- a/include/eda_draw_frame.h +++ b/include/eda_draw_frame.h @@ -300,8 +300,14 @@ public: * a single TOOL_BASE derived class to implement several user "tools", such as rectangle * and circle, or wire and bus. So each user-level tool is actually a TOOL_ACTION. */ + virtual void SetTool( const std::string& actionName ); virtual void PushTool( const std::string& actionName ); virtual void PopTool(); + + /** + * The selection tool runs underneath the tool stack, so clearing the stack is equivalent + * to selecting the selection tool. + */ virtual void ClearToolStack(); /** diff --git a/pagelayout_editor/tools/pl_drawing_tools.cpp b/pagelayout_editor/tools/pl_drawing_tools.cpp index 3dd749d6e3..c8d9082d50 100644 --- a/pagelayout_editor/tools/pl_drawing_tools.cpp +++ b/pagelayout_editor/tools/pl_drawing_tools.cpp @@ -74,18 +74,17 @@ void PL_DRAWING_TOOLS::Reset( RESET_REASON aReason ) int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent ) { WS_DATA_ITEM::WS_ITEM_TYPE type = aEvent.Parameter(); - bool immediateMode = aEvent.HasPosition(); VECTOR2I cursorPos; WS_DRAW_ITEM_BASE* item = nullptr; m_toolMgr->RunAction( PL_ACTIONS::clearSelection, true ); getViewControls()->ShowCursor( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); // Prime the pump - if( immediateMode ) + if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -103,15 +102,12 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent ) // There's nothing to roll-back, but we still need to pop the undo stack m_frame->RollbackFromUndo(); - - if( immediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -147,9 +143,6 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent ) item = nullptr; m_frame->OnModify(); - - if( immediateMode ) - break; } } else if( evt->IsClick( BUT_RIGHT ) ) @@ -173,9 +166,6 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent ) getViewControls()->CaptureCursor( item != nullptr ); } - if( immediateMode ) - m_frame->PopTool(); - return 0; } @@ -183,7 +173,6 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent ) int PL_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) { WS_DATA_ITEM::WS_ITEM_TYPE type = aEvent.Parameter(); - bool immediateMode = aEvent.HasPosition(); WS_DRAW_ITEM_BASE* item = nullptr; // We might be running as the same shape in another co-routine. Make sure that one @@ -193,11 +182,11 @@ int PL_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) m_toolMgr->RunAction( PL_ACTIONS::clearSelection, true ); getViewControls()->ShowCursor( true ); - m_frame->PushTool( aEvent.GetCommandStr().get() ); + m_frame->SetTool( aEvent.GetCommandStr().get() ); Activate(); // Prime the pump - if( immediateMode ) + if( aEvent.HasPosition() ) m_toolMgr->RunAction( ACTIONS::cursorClick ); // Main loop: keep receiving events @@ -213,15 +202,12 @@ int PL_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) { item = nullptr; m_frame->RollbackFromUndo(); - - if( immediateMode ) - break; } else { if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { - m_frame->PopTool(); + m_frame->ClearToolStack(); break; } } @@ -251,9 +237,6 @@ int PL_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) m_toolMgr->RunAction( ACTIONS::activatePointEditor ); m_frame->OnModify(); - - if( immediateMode ) - break; } } @@ -281,9 +264,6 @@ int PL_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent ) getViewControls()->CaptureCursor( item != nullptr ); } - if( immediateMode ) - m_frame->PopTool(); - return 0; }