From 17cd6493412178f1b420eb3a2dee9380174e65e0 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 10 Aug 2020 12:43:48 +0200 Subject: [PATCH] Part: code simplifications and sorting --- src/Mod/Part/Gui/TaskFaceColors.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Mod/Part/Gui/TaskFaceColors.cpp b/src/Mod/Part/Gui/TaskFaceColors.cpp index 5114f91344..276d1350cb 100644 --- a/src/Mod/Part/Gui/TaskFaceColors.cpp +++ b/src/Mod/Part/Gui/TaskFaceColors.cpp @@ -48,10 +48,10 @@ # include #endif +#include "TaskFaceColors.h" #include "ui_TaskFaceColors.h" #include "SoBrepFaceSet.h" -#include "TaskFaceColors.h" #include "ViewProviderExt.h" #include @@ -324,15 +324,13 @@ void FaceColors::on_boxSelection_toggled(bool checked) { Gui::View3DInventor* view = qobject_cast(Gui::getMainWindow()->activeWindow()); // toggle the button state and feature + d->boxSelection = checked; if (!checked) { - d->boxSelection = false; // end box selection mode if (view) view->getViewer()->stopSelection(); } - else { - d->boxSelection = true; - } + if (view && checked) { Gui::View3DInventorViewer* viewer = view->getViewer(); if (!viewer->isSelecting()) {