From 88fd95c116f7d8e534c7d6dca1d80e82b53c31c0 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 25 May 2018 15:23:28 +0200 Subject: [PATCH] return if less that 2 selected items --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 168fdae6cfb..5a5772dfb42 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -2120,6 +2120,8 @@ void MainWindow::insertActionBeforeLoadPlugin(QMenu* menu, QAction* actionToInse void MainWindow::colorItems() { std::size_t nb_files = scene->selectionIndices().size(); + if(nb_files<2) + return; std::vector colors_; colors_.reserve(nb_files); compute_color_map(scene->item(scene->selectionIndices().last())->color(),