Implement texture context menu

Apply to selected model/material, delete, duplicate, and
create new options are available in the menu.

Fixes: QDS-8342
Change-Id: Ib9bdc1738500a87361000bcd3e89403e3b8ccef8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2022-11-17 15:46:11 +02:00
parent e3a817ec77
commit ac1af9a582
12 changed files with 264 additions and 124 deletions

View File

@@ -315,6 +315,13 @@ ModelNode MaterialBrowserModel::materialAt(int idx) const
return {};
}
ModelNode MaterialBrowserModel::selectedMaterial() const
{
if (isValidIndex(m_selectedIndex))
return m_materialList[m_selectedIndex];
return {};
}
void MaterialBrowserModel::resetModel()
{
beginResetModel();