From 372b5c8ef31bbb549aa65f27e0bb4fb760eed973 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 15 May 2018 21:01:04 -0500 Subject: [PATCH] Enable/disable toolbar on selection --- src/GUI/Plater.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/GUI/Plater.cpp b/src/GUI/Plater.cpp index eda744715..ce68fdfde 100644 --- a/src/GUI/Plater.cpp +++ b/src/GUI/Plater.cpp @@ -512,6 +512,12 @@ void Plater::selection_changed() { if (have_sel) menu->FindItemByPosition(obj->identifier)->Check(true); } + + if (this->htoolbar != nullptr) { + for (auto tb : {TB_REMOVE, TB_MORE, TB_FEWER, TB_45CW, TB_45CCW, TB_SCALE, TB_SPLIT, TB_CUT, TB_LAYERS, TB_SETTINGS}) { + this->htoolbar->EnableTool(tb, have_sel); + } + } /* my $method = $have_sel ? 'Enable' : 'Disable';