Skip to content

Reset auxiliary dataset picker actions#232

Merged
ChangLi27 merged 1 commit intomasterfrom
feature/fix_auxiliary_dataset_selections
Feb 25, 2026
Merged

Reset auxiliary dataset picker actions#232
ChangLi27 merged 1 commit intomasterfrom
feature/fix_auxiliary_dataset_selections

Conversation

@ThomasKroes
Copy link
Contributor

This pull request refactors the way auxiliary dataset picker actions are managed in DatasetsAction.cpp. Instead of invalidating filters and resetting indices directly in the constructor, the code now uses lambda functions and signal connections to ensure these actions are triggered automatically when relevant datasets change. This improves maintainability and ensures the UI remains consistent with the underlying data.

Refactoring of dataset picker actions:

  • Introduced the invalidateFilters lambda to centralize the logic for invalidating filters on auxiliary dataset picker actions, and connected it to the position dataset picker's datasetPicked signal.
  • Added the resetAuxilliaryDatasets lambda to reset the selected indices of auxiliary dataset picker actions, and connected it to the changed signals of both the position and position source datasets.
  • Removed direct calls to invalidate filters from the constructor, relying instead on the new signal-based approach.

Introduce helper lambdas to centralize dataset picker state updates: invalidateFilters() to invalidate dependent filters and resetAuxiliaryDatasets() to clear aux picker selections (setCurrentIndex(-1)). Connect the position picker signal to run the invalidation and connect position dataset change signals to reset auxiliary pickers so color/size/opacity selections are cleared when position datasets change. This removes duplicated calls and ensures auxiliary pickers don't hold stale selections.
@ThomasKroes ThomasKroes self-assigned this Feb 25, 2026
@ThomasKroes ThomasKroes added the bug Something isn't working label Feb 25, 2026
@ChangLi27 ChangLi27 merged commit 08e712d into master Feb 25, 2026
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auxiliary dataset selections (color, opacity, size) not reset when position dataset changes

2 participants