TechDraw: double clicking page switch to techdraw wb. Fixes #13061

This commit is contained in:
PaddleStroke
2024-03-20 18:02:49 +01:00
committed by WandererFan
parent fdfa5de192
commit fae245be0e

View File

@@ -38,6 +38,7 @@
#include <App/DocumentObject.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/ViewProviderDocumentObject.h>
@@ -262,6 +263,16 @@ void ViewProviderPage::unsetEdit(int ModNum)
bool ViewProviderPage::doubleClicked(void)
{
// assure the TechDraw workbench
if (App::GetApplication()
.GetUserParameter()
.GetGroup("BaseApp")
->GetGroup("Preferences")
->GetGroup("Mod/TechDraw")
->GetBool("SwitchToWB", true)) {
Gui::Command::assureWorkbench("TechDrawWorkbench");
}
show();
if (m_mdiView) {
Gui::getMainWindow()->setActiveWindow(m_mdiView);