pl-editor: Don't update the properties panel while adding an text item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7074
This commit is contained in:
parent
36508807e7
commit
c3190627e2
|
@ -161,7 +161,10 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
item = dataItem->GetDrawItems()[0];
|
item = dataItem->GetDrawItems()[0];
|
||||||
item->SetFlags( IS_NEW | IS_MOVED );
|
item->SetFlags( IS_NEW | IS_MOVED );
|
||||||
m_selectionTool->AddItemToSel( item );
|
|
||||||
|
// Select the item but don't inform other tools (to prevent the Properties
|
||||||
|
// panel from updating the item before it has been placed)
|
||||||
|
m_selectionTool->AddItemToSel( item, true );
|
||||||
|
|
||||||
// update the cursor so it looks correct before another event
|
// update the cursor so it looks correct before another event
|
||||||
setCursor();
|
setCursor();
|
||||||
|
@ -175,6 +178,11 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent )
|
||||||
item->ClearEditFlags();
|
item->ClearEditFlags();
|
||||||
getView()->Update( item );
|
getView()->Update( item );
|
||||||
|
|
||||||
|
// Now we re-select and inform other tools, so that the Properties panel
|
||||||
|
// is updated.
|
||||||
|
m_toolMgr->RunAction( PL_ACTIONS::clearSelection, true );
|
||||||
|
m_selectionTool->AddItemToSel( item, false );
|
||||||
|
|
||||||
item = nullptr;
|
item = nullptr;
|
||||||
|
|
||||||
m_frame->OnModify();
|
m_frame->OnModify();
|
||||||
|
|
Loading…
Reference in New Issue