History

Implement desktop recordings browser dialog

David Rowe committed 9 years ago

Commit 00b6b2a1 parent dae6d6f4 files · +450 −29Browse files

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

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+6−0
@@ -224,6 +224,12 @@ QScriptValue WindowScriptingInterface::browseAssets(const QString& title, const · 223 unmodified lines
224224 if (path.isEmpty()) {
225225 path = getPreviousBrowseAssetLocation();
226226 }
227+ if (path.left(1) != "/") {
228+ path = "/" + path;
229+ }
230+ if (path.right(1) != "/") {
231+ path = path + "/";
232+ }
227233 QString result = OffscreenUi::getOpenAssetName(nullptr, title, path, nameFilter);
228234 if (!result.isEmpty()) {
229235 setPreviousBrowseAssetLocation(QFileInfo(result).absolutePath());