From f9c4c88768acfd85da9aa6ad213ffa46524e699f Mon Sep 17 00:00:00 2001 From: marioalexis Date: Mon, 14 Feb 2022 13:57:40 -0300 Subject: [PATCH] Part: Part_SectionCut command active only if view is View3DInventor class --- src/Mod/Part/Gui/Command.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Part/Gui/Command.cpp b/src/Mod/Part/Gui/Command.cpp index d307d10d2f..3b1cfee1ec 100644 --- a/src/Mod/Part/Gui/Command.cpp +++ b/src/Mod/Part/Gui/Command.cpp @@ -2508,7 +2508,8 @@ void CmdPartSectionCut::activated(int iMsg) bool CmdPartSectionCut::isActive(void) { - return hasActiveDocument(); + Gui::View3DInventor* view = dynamic_cast(Gui::getMainWindow()->activeWindow()); + return view ? true : false; } //---------------------------------------------------------------