From 6f1ee856f57d5260cc64ca40b309deb788af4676 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Thu, 30 Oct 2025 15:10:24 +0100 Subject: [PATCH] Handle derived data in cluster drop --- src/ScatterplotPlugin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ScatterplotPlugin.cpp b/src/ScatterplotPlugin.cpp index a7aed60..3155337 100644 --- a/src/ScatterplotPlugin.cpp +++ b/src/ScatterplotPlugin.cpp @@ -248,7 +248,13 @@ ScatterplotPlugin::ScatterplotPlugin(const PluginFactory* factory) : totalNumIndices += cluster.getIndices().size(); } - if (totalNumIndices == _positionDataset->getNumPoints()) + int totalNumPoints = 0; + if (_positionDataset->isDerivedData()) + totalNumPoints = _positionSourceDataset->getFullDataset()->getNumPoints(); + else + totalNumPoints = _positionDataset->getFullDataset()->getNumPoints(); + + if (totalNumIndices == totalNumPoints) { // Use the clusters set for points color dropRegions << new DropWidget::DropRegion(this, "Color", description, "palette", true, [this, candidateDataset]() {