SpreadSheet: Double clicking a spreadsheet changes to spreadsheet wb

This commit is contained in:
PaddleStroke
2024-03-25 10:44:06 +01:00
committed by WandererFan
parent a77afda2da
commit acd7832c2b

View File

@@ -31,6 +31,7 @@
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/View3DInventor.h>
@@ -99,6 +100,16 @@ bool ViewProviderSheet::setEdit(int ModNum)
bool ViewProviderSheet::doubleClicked()
{
// assure the SpreadSheet workbench
if (App::GetApplication()
.GetUserParameter()
.GetGroup("BaseApp")
->GetGroup("Preferences")
->GetGroup("Mod/Spreadsheet")
->GetBool("SwitchToWB", true)) {
Gui::Command::assureWorkbench("SpreadsheetWorkbench");
}
if (!this->view) {
showSpreadsheetView();
view->viewAll();