Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -224,6 +224,12 @@ QScriptValue WindowScriptingInterface::browseAssets(const QString& title, const · 223 unmodified lines | |||
| 224 | if (path.isEmpty()) { | 224 | if (path.isEmpty()) { |
| 225 | path = getPreviousBrowseAssetLocation(); | 225 | path = getPreviousBrowseAssetLocation(); |
| 226 | } | 226 | } |
| 227 | if (path.left(1) != "/") { | ||
| 228 | path = "/" + path; | ||
| 229 | } | ||
| 230 | if (path.right(1) != "/") { | ||
| 231 | path = path + "/"; | ||
| 232 | } | ||
| 227 | QString result = OffscreenUi::getOpenAssetName(nullptr, title, path, nameFilter); | 233 | QString result = OffscreenUi::getOpenAssetName(nullptr, title, path, nameFilter); |
| 228 | if (!result.isEmpty()) { | 234 | if (!result.isEmpty()) { |
| 229 | setPreviousBrowseAssetLocation(QFileInfo(result).absolutePath()); | 235 | setPreviousBrowseAssetLocation(QFileInfo(result).absolutePath()); |