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()) {