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
|
||||
+ userMaterialsSection.height;
|
||||
|
||||
if (!materialBrowserModel.hasMaterialRoot && (!materialBrowserBundleModel.matBundleExists
|
||||
|| mouse.y < userMatsSecBottom)) {
|
||||
if (!materialBrowserModel.hasMaterialRoot && materialBrowserModel.hasQuick3DImport
|
||||
&& (!materialBrowserBundleModel.matBundleExists || mouse.y < userMatsSecBottom)) {
|
||||
root.currentMaterial = null
|
||||
ctxMenu.popup()
|
||||
}
|
||||
@@ -288,6 +288,7 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
buttonSize: searchBox.height
|
||||
onClicked: materialBrowserModel.addNewMaterial()
|
||||
enabled: materialBrowserModel.hasQuick3DImport
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user