Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 59 files). Show all
Unified · Split
| @@ -168,9 +168,9 @@ QScriptValue WindowScriptingInterface::showAlert(const QString& message) { · 167 unmodified lines | ||
| 168 | 168 | /// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise |
| 169 | 169 | QScriptValue WindowScriptingInterface::showConfirm(const QString& message) { |
| 170 | 170 | bool confirm = false; |
| 171 | − OffscreenUi::question("", message, [&](QMessageBox::StandardButton response){ | |
| 172 | − confirm = (response == QMessageBox::Yes); | |
| 173 | − }); | |
| 171 | + if (QMessageBox::Yes == OffscreenUi::question("", message)) { | |
| 172 | + confirm = true; | |
| 173 | + } | |
| 174 | 174 | return QScriptValue(confirm); |
| 175 | 175 | } |
| 176 | 176 | |