History

Added browser as a tool

Atlante45 committed 12 years ago

Commit c07ba9f1 parent 7ab8b5a5 files · +37 −4Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+3−1
@@ -205,7 +205,9 @@ QScriptValue WindowScriptingInterface::showBrowse(const QString& title, const QS · 204 unmodified lines
205205 /// \return QScriptValue file path as a string if one was selected, otherwise `QScriptValue::NullValue`
206206 QScriptValue WindowScriptingInterface::showS3Browse(const QString& nameFilter) {
207207 ModelsBrowser browser(ENTITY_MODEL);
208− browser.setNameFilter(nameFilter);
208+ if (nameFilter != "") {
209+ browser.setNameFilter(nameFilter);
210+ }
209211 QEventLoop loop;
210212 connect(&browser, &ModelsBrowser::selected, &loop, &QEventLoop::quit);
211213 QMetaObject::invokeMethod(&browser, "browse", Qt::QueuedConnection);