diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index f732f2fc0254..5784f1166ff2 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -67,6 +67,7 @@ #include "ReferenceSelection.h" #include "Utils.h" #include "WorkflowManager.h" +#include "ViewProvider.h" #include "ViewProviderBody.h" // TODO Remove this header after fixing code so it won;t be needed here (2015-10-20, Fat-Zer) @@ -1723,6 +1724,19 @@ void CmdPartDesignAdditiveHelix::activated(int iMsg) } finishProfileBased(cmd, sketch, Feat); + + // If the initial helix creation fails then it leaves the base object invisible which makes things + // more difficult for the user. + // To avoid this the base obejct will be made tmp. visible again. + if (Feat->isError()) { + App::DocumentObject* base = static_cast(Feat)->BaseFeature.getValue(); + if (base) { + PartDesignGui::ViewProvider* view = dynamic_cast(Gui::Application::Instance->getViewProvider(base)); + if (view) + view->makeTemporaryVisible(true); + } + } + cmd->adjustCameraPosition(); };