ynput / ayon-core

Apache License 2.0
33 stars 36 forks source link

Bug: Workfiles tool deselecting a task will leave "Browse" and "Save As" button enabled #159

Open BigRoy opened 9 months ago

BigRoy commented 9 months ago

Is there an existing issue for this?

Current Behavior:

Currently in Workfiles tool when deselecting a task the Save As and Browse buttons remain enabled.

Clicking Save As also gives an error, e.g.:

Traceback (most recent call last):
  File "E:\dev\ayon-core\client\ayon_core\tools\workfiles\widgets\files_widget.py", line 253, in _on_workarea_save_clicked
    result = self._exec_save_as_dialog()
  File "E:\dev\ayon-core\client\ayon_core\tools\workfiles\widgets\files_widget.py", line 175, in _exec_save_as_dialog
    dialog.update_context()
  File "E:\dev\ayon-core\client\ayon_core\tools\workfiles\widgets\save_as_dialog.py", line 254, in update_context
    self._extension_combobox.addItems(data["extensions"])
TypeError: 'PySide2.QtWidgets.QComboBox.addItems' called with wrong argument types:
  PySide2.QtWidgets.QComboBox.addItems(NoneType)
Supported signatures:
  PySide2.QtWidgets.QComboBox.addItems(typing.Sequence[str])

Expected Behavior:

Whenever there's no valid context (e.g. no folder + task selected) it should deactivate the irrelevant buttons. The browse button is technically also invalid, since you wouldn't be able to open the file in a 'valid context' if you wouldn't have a task selected in the UI.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Open workfiles tool
  2. Deselect task

image

Are there any labels you wish to add?

Relevant log output:

No response

Additional context:

No response

BigRoy commented 5 months ago

For what it's worth - this issue still appears to be present.