forked from qt-creator/qt-creator
QmlDesigner: Implement "duplicate material" feature
Fixes: QDS-7013 Change-Id: I28a11dbd9d6586631c0edcf8003e551917eaac98 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -246,11 +246,14 @@ void MaterialBrowserModel::selectMaterial(int idx, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialBrowserModel::deleteMaterial(qint32 internalId)
|
||||
void MaterialBrowserModel::duplicateMaterial(int idx)
|
||||
{
|
||||
int idx = m_materialIndexHash.value(internalId);
|
||||
if (isValidIndex(idx))
|
||||
m_materialList[idx].destroy();
|
||||
emit duplicateMaterialTriggered(m_materialList.at(idx));
|
||||
}
|
||||
|
||||
void MaterialBrowserModel::deleteMaterial(int idx)
|
||||
{
|
||||
m_materialList[idx].destroy();
|
||||
}
|
||||
|
||||
void MaterialBrowserModel::renameMaterial(int idx, const QString &newName)
|
||||
|
||||
Reference in New Issue
Block a user