Make sure text gets drawn after placing even if the mouse isn't moved.
This commit is contained in:
parent
04057423a9
commit
19dc1f8b69
|
@ -365,8 +365,10 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
||||||
DIALOG_TEXT_PROPERTIES textDialog( m_frame, textMod );
|
DIALOG_TEXT_PROPERTIES textDialog( m_frame, textMod );
|
||||||
bool cancelled;
|
bool cancelled;
|
||||||
|
|
||||||
RunMainStack([&]() {
|
RunMainStack( [&]()
|
||||||
cancelled = !textDialog.ShowModal() || textMod->GetText().IsEmpty();
|
{
|
||||||
|
cancelled = !textDialog.ShowModal()
|
||||||
|
|| textMod->GetText().IsEmpty();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
if( cancelled )
|
if( cancelled )
|
||||||
|
@ -398,7 +400,8 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
||||||
textPcb->SetItalic( dsnSettings.GetTextItalic( layer ) );
|
textPcb->SetItalic( dsnSettings.GetTextItalic( layer ) );
|
||||||
textPcb->SetTextPos( (wxPoint) cursorPos );
|
textPcb->SetTextPos( (wxPoint) cursorPos );
|
||||||
|
|
||||||
RunMainStack([&]() {
|
RunMainStack( [&]()
|
||||||
|
{
|
||||||
m_frame->InstallTextOptionsFrame( textPcb );
|
m_frame->InstallTextOptionsFrame( textPcb );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -412,6 +415,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_controls->WarpCursor( text->GetPosition(), true );
|
m_controls->WarpCursor( text->GetPosition(), true );
|
||||||
m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, text );
|
m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, text );
|
||||||
|
m_view->Update( &selection() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue