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 | /// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise | 168 | /// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise |
| 169 | QScriptValue WindowScriptingInterface::showConfirm(const QString& message) { | 169 | QScriptValue WindowScriptingInterface::showConfirm(const QString& message) { |
| 170 | bool confirm = false; | 170 | bool confirm = false; |
| 171 | OffscreenUi::question("", message, [&](QMessageBox::StandardButton response){ | 171 | if (QMessageBox::Yes == OffscreenUi::question("", message)) { |
| 172 | confirm = (response == QMessageBox::Yes); | 172 | confirm = true; |
| 173 | }); | 173 | } |
| 174 | return QScriptValue(confirm); | 174 | return QScriptValue(confirm); |
| 175 | } | 175 | } |
| 176 | 176 | ||