Make sure text gets drawn after placing even if the mouse isn't moved.

This commit is contained in:
Jeff Young 2020-05-09 14:10:08 +01:00
parent 04057423a9
commit 19dc1f8b69
1 changed files with 10 additions and 6 deletions

View File

@ -365,8 +365,10 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
DIALOG_TEXT_PROPERTIES textDialog( m_frame, textMod );
bool cancelled;
RunMainStack([&]() {
cancelled = !textDialog.ShowModal() || textMod->GetText().IsEmpty();
RunMainStack( [&]()
{
cancelled = !textDialog.ShowModal()
|| textMod->GetText().IsEmpty();
} );
if( cancelled )
@ -398,7 +400,8 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
textPcb->SetItalic( dsnSettings.GetTextItalic( layer ) );
textPcb->SetTextPos( (wxPoint) cursorPos );
RunMainStack([&]() {
RunMainStack( [&]()
{
m_frame->InstallTextOptionsFrame( textPcb );
} );
@ -412,6 +415,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
{
m_controls->WarpCursor( text->GetPosition(), true );
m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, text );
m_view->Update( &selection() );
}
}