Skip to content

Commit

Permalink
rename copy action
Browse files Browse the repository at this point in the history
  • Loading branch information
chrizzFTD committed Sep 1, 2024
1 parent 8db853c commit 3c5e382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grill/views/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ def _addLayerTab(self, layer, paths=tuple(), *, identifier=None):
outline_tree.setSelectionMode(outline_tree.SelectionMode.ExtendedSelection)
outline_tree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)

def print_outline_selected_items():
def copy_outline_selection():
content = "\n".join(str(index.data(QtCore.Qt.UserRole)) for index in outline_tree.selectedIndexes() if index.isValid())
QtWidgets.QApplication.instance().clipboard().setText(content)

Expand All @@ -702,7 +702,7 @@ def show_outline_tree_context_menu(*args):

menu = QtWidgets.QMenu(outline_tree)
copy_paths = QtGui.QAction("Copy Paths", outline_tree)
copy_paths.triggered.connect(print_outline_selected_items)
copy_paths.triggered.connect(copy_outline_selection)
menu.addAction(copy_paths)
menu.exec(QtGui.QCursor.pos())

Expand Down

0 comments on commit 3c5e382

Please sign in to comment.