All checks were successful
Build and Test / build (pull_request) Successful in 32m17s
Copy QuickNav and ZTools source trees into reference/ for developer reference during the UI/UX rework. These are plain directories (not submodules) and are not included in the build. - reference/quicknav/ — QuickNav addon source - reference/ztools/ — ZTools addon source Part of the UI/UX rework preparation. See #346.
38 lines
1005 B
Python
38 lines
1005 B
Python
import FreeCAD as App
|
|
import FreeCADGui as Gui
|
|
|
|
|
|
class QuickNavWorkbench(Gui.Workbench):
|
|
"""Invisible workbench that installs QuickNav on load.
|
|
|
|
QuickNav does not replace the active workbench -- it layers on top.
|
|
Loading QuickNav installs the event filter and nav bar, then
|
|
immediately re-activates the previously active workbench.
|
|
"""
|
|
|
|
MenuText = "QuickNav"
|
|
ToolTip = "Keyboard-driven command navigation"
|
|
|
|
def Initialize(self):
|
|
from quicknav.core import QuickNavManager
|
|
|
|
QuickNavManager.instance().install()
|
|
App.Console.PrintMessage("QuickNav workbench initialized\n")
|
|
|
|
def Activated(self):
|
|
from quicknav.core import QuickNavManager
|
|
|
|
QuickNavManager.instance().handle_workbench_activated()
|
|
|
|
def Deactivated(self):
|
|
pass
|
|
|
|
def GetClassName(self):
|
|
return "Gui::PythonWorkbench"
|
|
|
|
|
|
Gui.addWorkbench(QuickNavWorkbench())
|
|
|
|
# Eager command registration
|
|
from quicknav.commands import QuickNav_Toggle # noqa: F401
|