mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Merge pull request #2040 from pypeclub/bugfix/workfile_toole_task_selection
Workfiles tool: Task selection
This commit is contained in:
commit
a457faa2a1
2 changed files with 6 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ def is_running_staging():
|
|||
Returns:
|
||||
bool: True if openpype version containt 'staging'.
|
||||
"""
|
||||
if "staging" in get_pype_version():
|
||||
if "staging" in get_openpype_version():
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -376,6 +376,9 @@ class TasksWidget(QtWidgets.QWidget):
|
|||
task (str): Name of the task to select.
|
||||
|
||||
"""
|
||||
task_view_model = self._tasks_view.model()
|
||||
if not task_view_model:
|
||||
return
|
||||
|
||||
# Clear selection
|
||||
selection_model = self._tasks_view.selectionModel()
|
||||
|
|
@ -383,8 +386,8 @@ class TasksWidget(QtWidgets.QWidget):
|
|||
|
||||
# Select the task
|
||||
mode = selection_model.Select | selection_model.Rows
|
||||
for row in range(self._tasks_model.rowCount()):
|
||||
index = self._tasks_model.index(row, 0)
|
||||
for row in range(task_view_model.rowCount()):
|
||||
index = task_view_model.index(row, 0)
|
||||
name = index.data(TASK_NAME_ROLE)
|
||||
if name == task_name:
|
||||
selection_model.select(index, mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue