@@ -184,22 +184,19 @@ ScatterplotPlugin::ScatterplotPlugin(const PluginFactory* factory) :
184184
185185 if (sameNumPoints || sameNumPointsAsFull) {
186186
187- // The number of points is equal, so offer the option to use the points dataset as source for points colors
187+ // Offer the option to use the points dataset as source for points colors
188188 dropRegions << new DropWidget::DropRegion (this , " Point color" , QString (" Colorize %1 points with %2" ).arg (_positionDataset->text (), candidateDataset->text ()), " palette" , true , [this , candidateDataset]() {
189- _settingsAction.getColoringAction ().addColorDataset (candidateDataset);
190- _settingsAction.getColoringAction ().setCurrentColorDataset (candidateDataset);
189+ _settingsAction.getColoringAction ().setCurrentColorDataset (candidateDataset); // calls addColorDataset internally
191190 });
192191
193- // The number of points is equal, so offer the option to use the points dataset as source for points size
192+ // Offer the option to use the points dataset as source for points size
194193 dropRegions << new DropWidget::DropRegion (this , " Point size" , QString (" Size %1 points with %2" ).arg (_positionDataset->text (), candidateDataset->text ()), " ruler-horizontal" , true , [this , candidateDataset]() {
195- _settingsAction.getPlotAction ().getPointPlotAction ().addPointSizeDataset (candidateDataset);
196- _settingsAction.getPlotAction ().getPointPlotAction ().getSizeAction ().setCurrentDataset (candidateDataset);
194+ _settingsAction.getPlotAction ().getPointPlotAction ().setCurrentPointSizeDataset (candidateDataset);
197195 });
198196
199- // The number of points is equal, so offer the option to use the points dataset as source for points opacity
197+ // Offer the option to use the points dataset as source for points opacity
200198 dropRegions << new DropWidget::DropRegion (this , " Point opacity" , QString (" Set %1 points opacity with %2" ).arg (_positionDataset->text (), candidateDataset->text ()), " brush" , true , [this , candidateDataset]() {
201- _settingsAction.getPlotAction ().getPointPlotAction ().addPointOpacityDataset (candidateDataset);
202- _settingsAction.getPlotAction ().getPointPlotAction ().getOpacityAction ().setCurrentDataset (candidateDataset);
199+ _settingsAction.getPlotAction ().getPointPlotAction ().setCurrentPointOpacityDataset (candidateDataset);
203200 });
204201 }
205202 }
0 commit comments