}
else {
if (theMessageKind == XGUI_AbortOperationMessage) {
- aResult = QMessageBox::question(qApp->activeWindow(),
- tr("Abort operation"),
- tr("All active operations will be aborted."),
- QMessageBox::Ok | QMessageBox::Cancel,
- QMessageBox::Cancel) == QMessageBox::Ok;
+ myActiveMessageBox = createMessageBox(tr("All active operations will be aborted."));
+ aResult = myActiveMessageBox->exec() == QMessageBox::Ok;
+ myActiveMessageBox = 0;
}
else if (theMessageKind == XGUI_InformationMessage) {
QString aMessage = tr("Please validate all your active operations before saving.");
if (theOperation && theOperation->isModified()) {
if (theMessageKind == XGUI_AbortOperationMessage) {
QString aMessage = tr("%1 operation will be aborted.").arg(theOperation->id());
- int anAnswer = QMessageBox::question(qApp->activeWindow(),
- tr("Abort operation"),
- aMessage,
- QMessageBox::Ok | QMessageBox::Cancel,
- QMessageBox::Cancel);
+ myActiveMessageBox = createMessageBox(aMessage);
+ int anAnswer = myActiveMessageBox->exec() == QMessageBox::Ok;
+ myActiveMessageBox = 0;
return anAnswer == QMessageBox::Ok;
}
else if (theMessageKind == XGUI_InformationMessage) {