[Bugfix]Gui: ensure message boxes appear and stay on top of main window
This commit is contained in:
@@ -409,7 +409,7 @@ void DlgMacroExecuteImp::on_deleteButton_clicked()
|
||||
MacroItem * mitem = static_cast<MacroItem *>(item);
|
||||
|
||||
if (mitem->systemWide) {
|
||||
QMessageBox::critical(qApp->activeWindow(), QObject::tr("Delete macro"),
|
||||
QMessageBox::critical(Gui::getMainWindow(), QObject::tr("Delete macro"),
|
||||
QObject::tr("Not allowed to delete system-wide macros"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ void EditDatumDialog::exec(bool atCursor)
|
||||
if (Constr->isDimensional()) {
|
||||
|
||||
if (sketch->hasConflicts()) {
|
||||
QMessageBox::critical(qApp->activeWindow(), QObject::tr("Distance constraint"),
|
||||
QMessageBox::critical(Gui::getMainWindow(), QObject::tr("Distance constraint"),
|
||||
QObject::tr("Not allowed to edit the datum because the sketch contains conflicting constraints"));
|
||||
return;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void EditDatumDialog::accepted()
|
||||
tryAutoRecompute(sketch);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
QMessageBox::critical(qApp->activeWindow(), QObject::tr("Dimensional constraint"), QString::fromUtf8(e.what()));
|
||||
QMessageBox::critical(Gui::getMainWindow(), QObject::tr("Dimensional constraint"), QString::fromUtf8(e.what()));
|
||||
Gui::Command::abortCommand();
|
||||
|
||||
if(sketch->noRecomputes) // if setdatum failed, it is highly likely that solver information is invalid.
|
||||
|
||||
Reference in New Issue
Block a user