Fix UIWidget::notifyLayoutAttrChangeParent() when used during a transaction.

Fix UIWidget::setLayoutMargin* not correctly invalidating the parent layout.
Fix a complete UI lock when trying to display a UIMessageBox after failed debugging in ecode.
This commit is contained in:
Martín Lucas Golini
2025-03-02 20:29:17 -03:00
parent 762b740102
commit 276ed6bfb0
5 changed files with 74 additions and 16 deletions

View File

@@ -1325,15 +1325,17 @@ void DebuggerPlugin::onRegisterDocument( TextDocument* doc ) {
if ( exitCode == 0 ) {
runCurrentConfig();
} else {
auto msgBox =
UIMessageBox::New( UIMessageBox::YES_NO,
i18n( "build_failed_debug_anyways",
"Building the project failed, do you want to "
"debug the binary anyways?" ) );
msgBox->setTitle( i18n( "build_failed", "Build Failed" ) );
msgBox->setCloseShortcut( { KEY_ESCAPE, KEYMOD_NONE } );
msgBox->on( Event::OnConfirm, [this]( auto ) { runCurrentConfig(); } );
msgBox->showWhenReady();
getPluginContext()->getUISceneNode()->runOnMainThread( [this] {
auto msgBox = UIMessageBox::New(
UIMessageBox::YES_NO,
i18n( "build_failed_debug_anyways",
"Building the project failed, do you want to "
"debug the binary anyways?" ) );
msgBox->setTitle( i18n( "build_failed", "Build Failed" ) );
msgBox->setCloseShortcut( { KEY_ESCAPE, KEYMOD_NONE } );
msgBox->on( Event::OnConfirm, [this]( auto ) { runCurrentConfig(); } );
msgBox->showWhenReady();
} );
}
} );
}