blob: 08568943951b424cab8f3e395838b79a138ae99e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From 4859a133b1a9179bf313fa60dd6e66dc422709b9 Mon Sep 17 00:00:00 2001
From: ayyaz20003 <81612629+ayyaz20003@users.noreply.github.com>
Date: Sat, 4 Apr 2026 07:28:49 +0500
Subject: [PATCH] Gui: Fix Sketcher toolbar state not persisting across
workbench switches (#28674)
--- a/src/Gui/ToolBarManager.cpp
+++ b/src/Gui/ToolBarManager.cpp
@@ -844,21 +844,8 @@ void ToolBarManager::onTimer()
void ToolBarManager::saveState() const
{
auto ignoreSave = [](QAction* action) {
- // If the toggle action is invisible then it's controlled by the application.
- // In this case the current state is not saved.
- if (!action->isVisible()) {
- return true;
- }
-
- QVariant property = action->property("DefaultVisibility");
- if (property.isNull()) {
- return false;
- }
-
- // If DefaultVisibility is Unavailable then never save the state because it's
- // always controlled by the client code.
- auto value = static_cast<ToolBarItem::DefaultVisibility>(property.toInt());
- return value == ToolBarItem::DefaultVisibility::Unavailable;
+ // Only save state for toolbars whose toggle action is user-visible.
+ return !action->isVisible();
};
QList<ToolBar*> toolbars = toolBars();
From 7db3f901fdbe427868c5732d43957298f24e342b Mon Sep 17 00:00:00 2001
From: theo-vt <theo.veilleux.trinh@proton.me>
Date: Thu, 12 Feb 2026 16:43:44 -0500
Subject: [PATCH] Fix diapearing sketcher tools
--- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
+++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
@@ -3915,8 +3915,6 @@ void ViewProviderSketch::unsetEdit(int ModNum)
auto gridnode = getGridNode();
pcRoot->removeChild(gridnode);
- Workbench::leaveEditMode();
-
if (listener) {
Gui::getMainWindow()->removeEventFilter(listener.get());
listener.reset();
|