From 1dfbced8d559a6fa32e2d8531cccb44a46e6cd4e Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 8 Feb 2018 13:23:57 +0100 Subject: [PATCH] If the color column selected clicked is not in the selection, edit the corresponding item, not the current selection. --- Polyhedron/demo/Polyhedron/Scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index 1b1b7970b7b..27fb9ab3835 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -790,7 +790,7 @@ Scene::setData(const QModelIndex &index, return true; break; case ColorColumn: - if(!selectionIndices().empty()) + if(selectionIndices().contains(item_id(item))) Q_FOREACH(Item_id item_index, selectionIndices()) this->item(item_index)->setColor(value.value()); else