Skip to content

Commit

Permalink
Merge pull request #3915 from Autodesk/bailp/EMSUSD-1619/remove-anon-…
Browse files Browse the repository at this point in the history
…layers

EMSUSD-1619 fix removal on multiple layers
  • Loading branch information
seando-adsk authored Sep 18, 2024
2 parents 5d5c425 + 50b5b85 commit 9d770c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/usd/ui/layerEditor/layerTreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions lib/usd/ui/layerEditor/layerTreeView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/usd/ui/layerEditor/mayaLayerEditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9d770c0

Please sign in to comment.