diff --git a/lib/usd/ui/layerEditor/layerTreeView.cpp b/lib/usd/ui/layerEditor/layerTreeView.cpp index fc9fb0258b..272003f87c 100644 --- a/lib/usd/ui/layerEditor/layerTreeView.cpp +++ b/lib/usd/ui/layerEditor/layerTreeView.cpp @@ -445,6 +445,11 @@ void LayerTreeView::callMethodOnSelection(const QString& undoName, simpleLayerMe { DelayAbstractCommandHook delayed(*_model->sessionState()->commandHook()); + callMethodOnSelectionNoDelay(undoName, method); +} + +void LayerTreeView::callMethodOnSelectionNoDelay(const QString& undoName, simpleLayerMethod method) +{ CallMethodParams params; auto selection = getSelectedLayerItems(); params.selection = &selection; diff --git a/lib/usd/ui/layerEditor/layerTreeView.h b/lib/usd/ui/layerEditor/layerTreeView.h index 18b08abcd7..3597b860f6 100644 --- a/lib/usd/ui/layerEditor/layerTreeView.h +++ b/lib/usd/ui/layerEditor/layerTreeView.h @@ -102,6 +102,7 @@ class LayerTreeView // calls a given method on all items in the selection, with the given string as the undo chunk // name void callMethodOnSelection(const QString& undoName, simpleLayerMethod method); + void callMethodOnSelectionNoDelay(const QString& undoName, simpleLayerMethod method); // menu callbacks void onAddParentLayer(const QString& undoName) const; diff --git a/lib/usd/ui/layerEditor/mayaLayerEditorWindow.cpp b/lib/usd/ui/layerEditor/mayaLayerEditorWindow.cpp index c7ba90af1b..142814dd77 100644 --- a/lib/usd/ui/layerEditor/mayaLayerEditorWindow.cpp +++ b/lib/usd/ui/layerEditor/mayaLayerEditorWindow.cpp @@ -173,7 +173,7 @@ std::string MayaLayerEditorWindow::proxyShapeName() const void MayaLayerEditorWindow::removeSubLayer() { QString name = "Remove"; - treeView()->callMethodOnSelection(name, &LayerTreeItem::removeSubLayer); + treeView()->callMethodOnSelectionNoDelay(name, &LayerTreeItem::removeSubLayer); } void MayaLayerEditorWindow::saveEdits()