Skip to content

Remove point size restriction#234

Merged
ChangLi27 merged 3 commits intomasterfrom
feature/fix_point_count_restriction
Feb 25, 2026
Merged

Remove point size restriction#234
ChangLi27 merged 3 commits intomasterfrom
feature/fix_point_count_restriction

Conversation

@ThomasKroes
Copy link
Contributor

@ThomasKroes ThomasKroes commented Feb 25, 2026

loosen_number_of_points_restriction
This video illustrates the improved behavior

This pull request makes improvements to dataset validation and error handling in the scatterplot and scalar actions. The main focus is on ensuring that datasets used for point size, opacity, and scalar sources match the expected criteria, particularly the number of points, and providing user feedback when mismatches occur.

Validation and error handling improvements:

  • Improved dataset filtering logic in setupPointSizeDatasetPickerAction and setupPointOpacityDatasetPickerAction to ensure that only datasets matching the expected data type and number of points are accepted. The checks now first validate the position dataset and then the data type, simplifying the logic and preventing mismatches. (src/DatasetsAction.cpp, [1] [2]
  • Added validation in the ScalarAction constructor to check that the selected scalar source dataset has the same number of points as the position dataset. If there is a mismatch, the selection change is not emitted and a user notification is shown with the details of the mismatch. (src/ScalarAction.cpp, src/ScalarAction.cppR21-R38)

Documentation improvement:

  • Clarified the parameter name in the documentation for the fromVariantMap method in ScalarSourceAction for better readability and accuracy. (src/ScalarSourceAction.h, src/ScalarSourceAction.hL57-R57)

@ThomasKroes ThomasKroes self-assigned this Feb 25, 2026
@ThomasKroes ThomasKroes added the bug Something isn't working label Feb 25, 2026
@ThomasKroes ThomasKroes linked an issue Feb 25, 2026 that may be closed by this pull request
When the source picker index points to a dataset, verify that the selected scalar source dataset has the same number of points as the ScatterplotPlugin's position dataset. If the counts differ, suppress emitting sourceSelectionChanged and add a user notification explaining the mismatch to prevent invalid selection. Also fix a parameter name in ScalarSourceAction.h's doc comment (variantMap).
Cache the number of points for the scalar source and position datasets and use those values in the mismatch notification. This avoids repeated getNumPoints() calls and provides a clearer notification message (includes numPositions and numScalars) when the two datasets have different sizes.
@ChangLi27 ChangLi27 merged commit 227f92f into master Feb 25, 2026
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.

Loosen scalar source (size, opacity) dataset restrictions

2 participants