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:
@@ -233,6 +233,20 @@ void MaterialEditorContextObject::setHasQuick3DImport(bool b)
|
||||
emit hasQuick3DImportChanged();
|
||||
}
|
||||
|
||||
bool MaterialEditorContextObject::hasModelSelection() const
|
||||
{
|
||||
return m_hasModelSelection;
|
||||
}
|
||||
|
||||
void MaterialEditorContextObject::setHasModelSelection(bool b)
|
||||
{
|
||||
if (b == m_hasModelSelection)
|
||||
return;
|
||||
|
||||
m_hasModelSelection = b;
|
||||
emit hasModelSelectionChanged();
|
||||
}
|
||||
|
||||
void MaterialEditorContextObject::setSelectedMaterial(const ModelNode &matNode)
|
||||
{
|
||||
m_selectedMaterial = matNode;
|
||||
|
||||
Reference in New Issue
Block a user