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

Fix drag and drop for stacked diagrams (follow-up) #60600

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gacarrillor
Copy link
Member

@gacarrillor gacarrillor commented Feb 13, 2025

Follow-up #60278.

This PR adjusts issues and improves consistency with drag and drop behavior in other parts of QGIS. See #60596 for screencasts of the buggy behavior in the current master.

Namely, this PR:

  • Replaces the drop indicator, switching from a box to a horizontal line (which expands to the whole row). The rationale is that stacked diagrams don't handle (yet) a parent-child hierarchy (i.e., one cannot have nested stacked diagrams in the GUI), but act instead as a flat list. This is consistent with drag and drop for other flat lists in QGIS (e.g., classification symbol lists or graduated symbol lists).

  • Fixes an issue that moves the dropped item to the end of the list (i.e., an append operation), even if the desired position was, e.g., between other items.

  • Fixes an issue that makes it possible to obtain copies of the dragged object.

  • Enables moving multiple items and positioning them in the expected way (e.g., if a diagram A is below a diagram B before the drag, it should continue being below B once dropped).

  • Minor fixes: Allow dropping items below all other items (i.e., in the blank area), as well as in the whole row span (i.e., also for columns > 0).

Screencast of the result:

dragndrop_stackeddiagrams.mp4

Fix #60596

@github-actions github-actions bot added this to the 3.42.0 milestone Feb 13, 2025
@gacarrillor gacarrillor added GUI/UX Related to QGIS application GUI or User Experience Bug Either a bug report, or a bug fix. Let's hope for the latter! Diagrams backport release-3_40 labels Feb 13, 2025
Copy link

github-actions bot commented Feb 13, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit ec63a27)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit ec63a27)

@gacarrillor gacarrillor force-pushed the dragndrop_stackdiagrams_followup branch 2 times, most recently from f5d8202 to 1940074 Compare February 14, 2025 09:05
@gacarrillor

This comment was marked as outdated.

…s (items don't have children so far), because of that, we can drop at any index as well
… ease drag'n'drop, as well as sorting the eventually multiple dragged subDiagrams to get a clean drop. Additionally, fixes previous copying of items.
@gacarrillor gacarrillor force-pushed the dragndrop_stackdiagrams_followup branch from 1940074 to ec63a27 Compare February 20, 2025 17:24
@gacarrillor
Copy link
Member Author

(Rebased)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 Bug Either a bug report, or a bug fix. Let's hope for the latter! Diagrams GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Still) Unable to reorder subdiagrams in stacked diagrams dialog
1 participant