From 5a212160c19a3fad8e67044f07d120161d0c2f26 Mon Sep 17 00:00:00 2001 From: forbes Date: Fri, 13 Feb 2026 14:08:12 -0600 Subject: [PATCH] cherry-pick #16: origin commands - Commit/Pull/Push (679aaec6d49) --- src/Gui/Application.cpp | 1 + src/Gui/CMakeLists.txt | 1 + src/Gui/Command.h | 1 + src/Gui/Workbench.cpp | 11 ++++++++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index ac7eda9c4d..3cb80e658f 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1022,6 +1022,7 @@ void Application::createStandardOperations() Gui::CreateStructureCommands(); Gui::CreateTestCommands(); Gui::CreateLinkCommands(); + Gui::CreateOriginCommands(); } void Application::slotNewDocument(const App::Document& Doc, bool isMainDoc) diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index c9519eed18..dd4641361c 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -529,6 +529,7 @@ SET(Command_CPP_SRCS CommandFeat.cpp CommandMacro.cpp CommandStd.cpp + CommandOrigin.cpp CommandWindow.cpp CommandTest.cpp CommandView.cpp diff --git a/src/Gui/Command.h b/src/Gui/Command.h index f060a3dd86..d0d6e7a0a8 100644 --- a/src/Gui/Command.h +++ b/src/Gui/Command.h @@ -247,6 +247,7 @@ void CreateWindowStdCommands(); void CreateStructureCommands(); void CreateTestCommands(); void CreateLinkCommands(); +void CreateOriginCommands(); /** The CommandBase class diff --git a/src/Gui/Workbench.cpp b/src/Gui/Workbench.cpp index 96b393b58c..93e500fd50 100644 --- a/src/Gui/Workbench.cpp +++ b/src/Gui/Workbench.cpp @@ -682,7 +682,10 @@ MenuItem* StdWorkbench::setupMenuBar() const file->setCommand("&File"); *file << "Std_New" << "Std_Open" << "Std_RecentFiles" << "Separator" << "Std_CloseActiveWindow" << "Std_CloseAllWindows" << "Separator" << "Std_Save" << "Std_SaveAs" - << "Std_SaveCopy" << "Std_SaveAll" << "Std_Revert" << "Separator" << "Std_Import" + << "Std_SaveCopy" << "Std_SaveAll" << "Std_Revert" + << "Separator" << "Origin_Commit" << "Origin_Pull" << "Origin_Push" + << "Origin_Info" << "Origin_BOM" + << "Separator" << "Std_Import" << "Std_Export" << "Std_MergeProjects" << "Std_ProjectInfo" << "Separator" << "Std_Print" << "Std_PrintPreview" << "Std_PrintPdf" << "Separator" << "Std_Quit"; @@ -836,6 +839,12 @@ ToolBarItem* StdWorkbench::setupToolBars() const file->setCommand("File"); *file << "Std_Origin" << "Std_New" << "Std_Open" << "Std_Save"; + // Origin Tools (PLM operations - commands auto-disable when not applicable) + auto originTools = new ToolBarItem(root); + originTools->setCommand("Origin Tools"); + *originTools << "Origin_Commit" << "Origin_Pull" << "Origin_Push" + << "Separator" << "Origin_Info" << "Origin_BOM"; + // Edit auto edit = new ToolBarItem(root); edit->setCommand("Edit");