Skip to content

Commit f335565

Browse files
Add clause to not use selection keys on the same datasets
1 parent e26f23c commit f335565

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/ScatterplotPlugin.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,11 @@ void ScatterplotPlugin::loadColors(const Dataset<Clusters>& clusters)
875875
const auto& clusterVec = clusters->getClusters();
876876
std::vector<Vector3f> localColors(_numPoints, Vector3f(1, 0, 1));
877877

878-
std::vector<int> mappedIndices = selectionGroup.getMappingBetweenDatasets(getTopDataset(clusters), getTopDataset(_positionDataset));
878+
// If the clusters belong to the same dataset as we're dropping them on, then skip to other path
879+
if (clusters->getParent() == _positionDataset)
880+
continue;
881+
882+
std::vector<int> mappedIndices = selectionGroup.getMappingBetweenDatasets(getTopDataset(clusters), _positionDataset);
879883

880884
for (int j = 0; j < mappedIndices.size(); j++)
881885
{

0 commit comments

Comments
 (0)