Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMSUSD-1619 fix removal on multiple layers #3915

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/usd/ui/layerEditor/layerTreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,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 @@ -100,6 +100,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