@@ -233,7 +233,8 @@ ScatterplotPlugin::ScatterplotPlugin(const PluginFactory* factory) :
233233 auto & selectionAction = _settingsAction.getSelectionAction ();
234234
235235 getSamplerAction ().initialize (this , &selectionAction.getPixelSelectionAction (), &selectionAction.getSamplerPixelSelectionAction ());
236- // getSamplerAction().setViewGeneratorFunction([this](const ViewPluginSamplerAction::SampleContext& toolTipContext) -> QString {
236+ // getSamplerAction().setHtmlViewGeneratorFunction([this](const ViewPluginSamplerAction::SampleContext& toolTipContext) -> QString {
237+ // qDebug() << __FUNCTION__;
237238 // QStringList localPointIndices, globalPointIndices;
238239
239240 // for (const auto& localPointIndex : toolTipContext["LocalPointIndices"].toList())
@@ -256,11 +257,24 @@ ScatterplotPlugin::ScatterplotPlugin(const PluginFactory* factory) :
256257 auto widget = new QPushButton ();
257258
258259 getSamplerAction ().setWidgetViewGeneratorFunction ([this , widget](const ViewPluginSamplerAction::SampleContext& toolTipContext) -> QWidget* {
260+ QStringList localPointIndices, globalPointIndices;
261+
262+ for (const auto & localPointIndex : toolTipContext[" LocalPointIndices" ].toList ())
263+ localPointIndices << QString::number (localPointIndex.toInt ());
264+
265+ for (const auto & globalPointIndex : toolTipContext[" GlobalPointIndices" ].toList ())
266+ globalPointIndices << QString::number (globalPointIndex.toInt ());
267+
268+ if (localPointIndices.isEmpty ())
269+ return {};
270+
271+ widget->setText (QString (" Point ID's: %1" ).arg (globalPointIndices.join (" , " )));
272+
259273 return widget;
260274 });
261275
262276 // getSamplerAction().setViewingMode(ViewPluginSamplerAction::ViewingMode::Tooltip);
263- getSamplerAction ().getEnabledAction ().setChecked (false );
277+ // getSamplerAction().getEnabledAction().setChecked(false);
264278
265279 getLearningCenterAction ().addVideos (QStringList ({ " Practitioner" , " Developer" }));
266280}
@@ -429,11 +443,17 @@ void ScatterplotPlugin::selectPoints()
429443
430444void ScatterplotPlugin::samplePoints ()
431445{
446+
447+
432448 auto & samplerPixelSelectionTool = _scatterPlotWidget->getSamplerPixelSelectionTool ();
433449
434- if (!_positionDataset.isValid () || !samplerPixelSelectionTool.isActive () || _scatterPlotWidget->isNavigating () || !samplerPixelSelectionTool.isEnabled ())
450+ qDebug () << __FUNCTION__ << samplerPixelSelectionTool.isActive () << _scatterPlotWidget->isNavigating () << samplerPixelSelectionTool.isEnabled ();
451+
452+ if (!_positionDataset.isValid () || _scatterPlotWidget->isNavigating () || !samplerPixelSelectionTool.isEnabled ())
435453 return ;
436454
455+
456+
437457 auto selectionAreaImage = samplerPixelSelectionTool.getAreaPixmap ().toImage ();
438458
439459 std::vector<std::uint32_t > targetSelectionIndices;
0 commit comments