Merged
Conversation
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
approved these changes
Feb 25, 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 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:
setupPointSizeDatasetPickerActionandsetupPointOpacityDatasetPickerActionto 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]ScalarActionconstructor 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:
fromVariantMapmethod inScalarSourceActionfor better readability and accuracy. (src/ScalarSourceAction.h, src/ScalarSourceAction.hL57-R57)