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