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

Add Paths and Folders to Catalogue TreeView #97

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

pboettch
Copy link
Collaborator

@pboettch pboettch commented Mar 20, 2025

Addresses #59

@pboettch pboettch requested a review from jeandet March 20, 2025 17:55
@jeandet
Copy link
Member

jeandet commented Mar 21, 2025

While testing I got one issue when trying to drag a folder inside a folder:

Traceback (most recent call last):
  File "/var/home/jeandet/Documents/prog/tscat_gui/tscat_gui/__init__.py", line 497, in _external_signal_emission_changed
    if isinstance(action.entities[0], _Catalogue):
                  ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

@pboettch
Copy link
Collaborator Author

While testing I got one issue when trying to drag a folder inside a folder:

Traceback (most recent call last):
  File "/var/home/jeandet/Documents/prog/tscat_gui/tscat_gui/__init__.py", line 497, in _external_signal_emission_changed
    if isinstance(action.entities[0], _Catalogue):
                  ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

This is fixed, but I have a new problem, maybe related to a newer Pyside6 version and unrelated to folders/paths: 176b8fa

@jeandet
Copy link
Member

jeandet commented Mar 30, 2025

Doesn't crash anymore but folder drag and drop doesn't work. It should either work or acceptDrop should return false for folders.
The former is preferable since crating a folder in the right position isn't that intuitive and trivial for new users.

@pboettch
Copy link
Collaborator Author

OK, I agree.

When dropping a folder the full folder-structures (with subfolders and its catalogues) will be moved and/or created.

I think they should be deleted from their previous/dragged position. What do you think?

However, moving a folder is not undoable, except for moving it back manually. Or when there was a catalogue inside, this is undoable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants