forked from qt-creator/qt-creator
EffectComposer: Clear deleted effect if it is currently open
Fixes: QDS-11787 Change-Id: Iecd177a153e88a49476dbea0241c31726d05a6a8 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -69,9 +69,15 @@ void EffectComposerView::customNotification([[maybe_unused]] const AbstractView
|
||||
[[maybe_unused]] const QList<QmlDesigner::ModelNode> &nodeList,
|
||||
const QList<QVariant> &data)
|
||||
{
|
||||
if (identifier == "open_effectcomposer_composition" && data.count() > 0) {
|
||||
if (data.size() < 1)
|
||||
return;
|
||||
|
||||
if (identifier == "open_effectcomposer_composition") {
|
||||
const QString compositionPath = data[0].toString();
|
||||
m_widget->openComposition(compositionPath);
|
||||
} else if (identifier == "effectcomposer_effects_deleted") {
|
||||
if (data[0].toStringList().contains(m_widget->effectComposerModel()->currentComposition()))
|
||||
m_widget->effectComposerModel()->clear(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -334,6 +334,8 @@ void AssetsLibraryWidget::handleDeleteEffects(const QStringList &effectNames)
|
||||
// contain only unworkable states.
|
||||
if (clearStacks)
|
||||
document->clearUndoRedoStacks();
|
||||
|
||||
m_assetsView->emitCustomNotification("effectcomposer_effects_deleted", {}, {effectNames});
|
||||
}
|
||||
|
||||
void AssetsLibraryWidget::invalidateThumbnail(const QString &id)
|
||||
|
Reference in New Issue
Block a user