summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Project
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2018-09-03 10:28:22 +0300
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-09-03 09:25:25 +0000
commit58b2af6d3fbb77b27e24fa33a4fe6a6c79b2d7f8 (patch)
tree218e7245c63801692f15ed0b63392f763c65f565 /src/Authoring/Studio/Palettes/Project
parent8110ea8f4bb8cb020450e2a3f522fa3cf819983d (diff)
Edit material in Inspector with double-click from project palette
Task-number: QT3DS-2189 Change-Id: I8388bfd2f3da077ecd93c2ffac33a466bab459ad Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Project')
-rw-r--r--src/Authoring/Studio/Palettes/Project/ProjectView.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/Project/ProjectView.cpp b/src/Authoring/Studio/Palettes/Project/ProjectView.cpp
index a58986dd..be2d7375 100644
--- a/src/Authoring/Studio/Palettes/Project/ProjectView.cpp
+++ b/src/Authoring/Studio/Palettes/Project/ProjectView.cpp
@@ -408,13 +408,14 @@ void ProjectView::openFile(int row)
return;
QString filePath = QDir::cleanPath(fi.absoluteFilePath());
- QTimer::singleShot(0, [filePath]() {
+ QTimer::singleShot(0, [filePath, row, this]() {
// .uip files should be opened in this studio instance
if (filePath.endsWith(QLatin1String(".uip"), Qt::CaseInsensitive)) {
if (g_StudioApp.PerformSavePrompt())
g_StudioApp.OnLoadDocument(filePath);
+ } else if (filePath.endsWith(QLatin1String(".matdata"), Qt::CaseInsensitive)) {
+ editMaterial(row);
} else {
- // TODO: materials to be opened in inspector, pending materials handling overhaul
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
}
});