forked from qt-creator/qt-creator
QmlDesigner: Disable "add material" actions when QtQuick3D not imported
Fixes: QDS-7516 Change-Id: Id92a76e455b17b6c7baa11f8e472fa0b6bfcde9f Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -76,8 +76,8 @@ Item {
|
|||||||
var userMatsSecBottom = mapFromItem(userMaterialsSection, 0, userMaterialsSection.y).y
|
var userMatsSecBottom = mapFromItem(userMaterialsSection, 0, userMaterialsSection.y).y
|
||||||
+ userMaterialsSection.height;
|
+ userMaterialsSection.height;
|
||||||
|
|
||||||
if (!materialBrowserModel.hasMaterialRoot && (!materialBrowserBundleModel.matBundleExists
|
if (!materialBrowserModel.hasMaterialRoot && materialBrowserModel.hasQuick3DImport
|
||||||
|| mouse.y < userMatsSecBottom)) {
|
&& (!materialBrowserBundleModel.matBundleExists || mouse.y < userMatsSecBottom)) {
|
||||||
root.currentMaterial = null
|
root.currentMaterial = null
|
||||||
ctxMenu.popup()
|
ctxMenu.popup()
|
||||||
}
|
}
|
||||||
@@ -288,6 +288,7 @@ Item {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
buttonSize: searchBox.height
|
buttonSize: searchBox.height
|
||||||
onClicked: materialBrowserModel.addNewMaterial()
|
onClicked: materialBrowserModel.addNewMaterial()
|
||||||
|
enabled: materialBrowserModel.hasQuick3DImport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user