Enable/disable toolbar on selection

This commit is contained in:
Joseph Lenox 2018-05-15 21:01:04 -05:00 committed by Joseph Lenox
parent 57f684a1c4
commit 372b5c8ef3

View File

@ -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';