forked from qt-creator/qt-creator
QmlDesigner: Disable apply material to selected when no selection exist
When there is no valid model selected, disable the "apply to selected" actions in the material editor and browser. Change-Id: Id8e771c64e69c0ba2f42dff01d19ffbf4afafb77 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -677,6 +677,8 @@ void MaterialEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNo
|
||||
if (node.isSubclassOf("QtQuick3D.Model"))
|
||||
m_selectedModels.append(node);
|
||||
}
|
||||
|
||||
m_qmlBackEnd->contextObject()->setHasModelSelection(!m_selectedModels.isEmpty());
|
||||
}
|
||||
|
||||
void MaterialEditorView::currentStateChanged(const ModelNode &node)
|
||||
|
||||
Reference in New Issue
Block a user