Skip to content

Comments

Fix HUD issues on macOS and Linux#226

Merged
sbvis merged 16 commits intomasterfrom
feature/fix_linux_crash_hud
Feb 20, 2026
Merged

Fix HUD issues on macOS and Linux#226
sbvis merged 16 commits intomasterfrom
feature/fix_linux_crash_hud

Conversation

@ThomasKroes
Copy link
Contributor

@ThomasKroes ThomasKroes commented Feb 16, 2026

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

  • Added _pointSizeDatasetPickerAction and _pointOpacityDatasetPickerAction to DatasetsAction, including their initialization, filter functions, and integration into action lists. [1] [2] [3] [4]
  • Updated ScatterplotPlugin to track _pointSizeDataset and _pointOpacityDataset, including logic for updating and connecting/disconnecting these datasets when the source changes. [1] [2]

UI and HUD improvements

  • Enhanced updateHeadsUpDisplay() to include point size and opacity datasets, and prevent HUD updates while a project is opening. [1] [2]

Synchronization and connection management

  • Updated dataset picker actions to support clearable widgets and proper connection/disconnection to public actions for point size and opacity. [1] [2] [3]

Scatterplot plugin lifecycle updates

  • Modified plugin initialization and serialization logic to ensure new dataset pickers and HUD updates are handled correctly. [1] [2] [3]

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.

@ThomasKroes ThomasKroes self-assigned this Feb 16, 2026
@ThomasKroes ThomasKroes added the bug Something isn't working label Feb 16, 2026
@ThomasKroes ThomasKroes requested review from alxvth and sbvis February 16, 2026 15:30
@ThomasKroes
Copy link
Contributor Author

@sbvis would you be able to verify whether this also fixes the issues on macOS?

@sbvis
Copy link
Contributor

sbvis commented Feb 17, 2026

Yes, it is working and nolonger crashing on macos:
image

@ThomasKroes
Copy link
Contributor Author

Yes, it is working and nolonger crashing on macos: image

Thanks for testing :)

ThomasKroes and others added 15 commits February 19, 2026 11:09
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.
@ThomasKroes ThomasKroes force-pushed the feature/fix_linux_crash_hud branch from d17f88c to dc8d623 Compare February 19, 2026 10:09
@sbvis
Copy link
Contributor

sbvis commented Feb 19, 2026

Working fine now.
One thing we need to add is: When an opacity dataset is set and the dataset data changes, the opacity is not updated based on the changed data until I click on the scatterplot. It would be nice to update it when the dataset data changes.

@ThomasKroes
Copy link
Contributor Author

@sbvis good catch, I will take a look at that before I merge!

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 sbvis merged commit 2410be6 into master Feb 20, 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.

3 participants