Merged
Conversation
Contributor
Author
|
@sbvis would you be able to verify whether this also fixes the issues on macOS? |
Contributor
Contributor
Author
…ation. Put guard in updateHeadsUpDisplay
…ation. Put guard in updateHeadsUpDisplay
…synchronization logic
Only call setCurrentColorDataset when the picked dataset is valid and a project is not currently opening. Previously the code unconditionally updated the current color dataset in the DatasetPickerAction handler; this change prevents dataset changes from being applied while a project load is in progress, avoiding potential race conditions or invalid state during project open.
Refactor dataset handling by moving color/size/opacity dataset setup and tracking out of ScatterplotPlugin into DatasetsAction. Add setup helper methods, getters, serialization (from/to QVariantMap), and connect/disconnect logic for public actions. Update ScatterplotPlugin to use the SettingsAction's coloring state when building the HUD and remove redundant dataset members and signal handlers from the plugin. This improves separation of concerns and centralizes dataset-related UI wiring in DatasetsAction.
Hook dataset picker changes to the heads-up display so the HUD updates immediately when datasets are picked. Adds connections from position, color, point size, and point opacity DatasetPickerAction::datasetPicked signals to ScatterplotPlugin::updateHeadsUpDisplay in init() (src/ScatterplotPlugin.cpp).
Add and wire up dataset picker actions for color, point size and point opacity; rename setup helpers to *PickerAction variants and re-run setup when a project is opened. Replace older datasetPicked connections with currentIndexChanged/sourceSelectionChanged signals for more reliable heads-up-display (HUD) updates, and connect dataset guiNameChanged directly to ScatterplotPlugin::updateHeadsUpDisplay. Add filter checks to ensure point-size/opacity datasets match position dataset sizes. Clean up commented/old code and move updateHeadsUpDisplayTextColor visibility to align with the refactor.
Extracted repeated dataset picker initializations into setupDatasetPickerActions and call it on construction and when a project opens to reduce duplication. Switched the point opacity picker connection to currentIndexChanged and added logic to synchronize the picker with the ScalarAction (set default Constant source when no dataset, update picker when sourceSelection changes, clear index when not using a dataset). Added descriptive comments for the new helper and existing setup methods in the header.
Move control of dataset picker initialization from DatasetsAction to ScatterplotPlugin so the plugin can defer or re-run setup during project open. Make setupDatasetPickerActions protected and add ScatterplotPlugin as a friend so the plugin can call it. Refactor point-size dataset picker: tighten the filter to require PointType, a valid position dataset, and matching point counts; rework signal wiring to keep the DatasetPickerAction and ScalarAction synchronized and to set a default constant source when no dataset is selected. Minor debug logging added to aid troubleshooting.
Add DatasetsAction::invalidateDatasetPickerActionFilters() (declared in the header and implemented) which calls invalidateFilter() on all dataset picker actions (_position, _color, _pointSize, _pointOpacity). Update ScatterplotPlugin::init() to call this new method instead of setupDatasetPickerActions() when initializing so picker filters are refreshed to reflect the current datasets without reinitializing the actions.
When the position dataset changes, clear the current color dataset and refresh dependent dataset pickers (color, point size, point opacity). Mark the position picker as Clearable, connect its datasetPicked signal to invalidate the other pickers, and invalidate them initially. Update filter callbacks to require a valid position dataset (and replace getPositionSourceDataset() calls with getPositionDataset()). This ensures pickers reflect the current position dataset and prevents stale/invalid color selections after position changes.
d17f88c to
dc8d623
Compare
Contributor
|
Working fine now. |
Contributor
Author
|
@sbvis good catch, I will take a look at that before I merge! |
alxvth
approved these changes
Feb 20, 2026
Remove leftover qDebug() calls from DatasetsAction::setupPointSizeDatasetPickerAction to clean up noisy debug output during dataset validation. The changes eliminate three intermediate debug prints while preserving the validation logic that ensures the dataset is of PointType and matches the position dataset point count.
sbvis
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This pull request fixes HUD-related crashes on Linux and macOS and adds support for selecting datasets to control point size and opacity in scatterplots, alongside existing position and color dataset selection. It introduces new dataset picker actions for point size and opacity, updates the heads-up display (HUD) logic to reflect these new controls, and ensures proper synchronization and connection management for these actions.
New dataset picker actions for point size and opacity:
Feature additions
_pointSizeDatasetPickerActionand_pointOpacityDatasetPickerActiontoDatasetsAction, including their initialization, filter functions, and integration into action lists. [1] [2] [3] [4]ScatterplotPluginto track_pointSizeDatasetand_pointOpacityDataset, including logic for updating and connecting/disconnecting these datasets when the source changes. [1] [2]UI and HUD improvements
updateHeadsUpDisplay()to include point size and opacity datasets, and prevent HUD updates while a project is opening. [1] [2]Synchronization and connection management
Scatterplot plugin lifecycle updates
These changes collectively improve the scatterplot plugin's flexibility and user experience by allowing dynamic control over point size and opacity based on loaded datasets.