Skip to content

Commit dd545e1

Browse files
authored
Handle derived data in cluster drop (#218)
1 parent f3e7e43 commit dd545e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/ScatterplotPlugin.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,13 @@ ScatterplotPlugin::ScatterplotPlugin(const PluginFactory* factory) :
248248
totalNumIndices += cluster.getIndices().size();
249249
}
250250

251-
if (totalNumIndices == _positionDataset->getNumPoints())
251+
int totalNumPoints = 0;
252+
if (_positionDataset->isDerivedData())
253+
totalNumPoints = _positionSourceDataset->getFullDataset<Points>()->getNumPoints();
254+
else
255+
totalNumPoints = _positionDataset->getFullDataset<Points>()->getNumPoints();
256+
257+
if (totalNumIndices == totalNumPoints)
252258
{
253259
// Use the clusters set for points color
254260
dropRegions << new DropWidget::DropRegion(this, "Color", description, "palette", true, [this, candidateDataset]() {

0 commit comments

Comments
 (0)