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

Workfiles: Browse and Save As button only enabled when in valid context #1085

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Jan 14, 2025

Changelog Description

Only allow saving and browsing from a "task" context.

Additional info

Fixes e.g. this error when clicking Save As before the Workfiles tool has fully initialized:

Traceback (most recent call last):
  File "C:\CODE\__YNPUT\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 "C:\CODE\__YNPUT\ayon-core\client\ayon_core\tools\workfiles\widgets\files_widget.py", line 175, in _exec_save_as_dialog
    dialog.update_context()
  File "C:\CODE\__YNPUT\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])

As reported e.g. here

Testing notes:

  1. Workfiles tool should work as intended
  2. Deselecting a folder or task should block "browse" and "save as" buttons

@BigRoy BigRoy added the type: bug Something isn't working label Jan 14, 2025
@BigRoy BigRoy self-assigned this Jan 14, 2025
@ynbot ynbot added the size/XS label Jan 14, 2025
@iLLiCiTiT
Copy link
Member

@antirotor you had same issue in mocha, can you test it?

@BigRoy BigRoy merged commit e54ec4e into ynput:develop Jan 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants