gui: move AsmCmdGotoRelation to navigation toolbar

This commit is contained in:
Zheng, Lei 2018-07-30 13:02:39 +08:00
parent 03a336480f
commit 79c9d52e89
2 changed files with 5 additions and 3 deletions

1
gui.py
View File

@ -557,6 +557,7 @@ class AsmCmdGotoRelation(AsmCmdBase):
_tooltip = 'Select the corresponding part object in the relation group'
_iconName = 'Assembly_GotoRelation.svg'
_accel = 'A, R'
_toolbarName = ''
@classmethod
def Activated(cls):

View File

@ -38,14 +38,15 @@ class Assembly3Workbench(FreeCADGui.Workbench):
def Initialize(self):
from .mover import AsmDocumentObserver
from .gui import AsmCmdManager
from .gui import AsmCmdManager,AsmCmdGotoRelation
AsmCmdManager.init()
cmdSet = set()
for name,cmds in AsmCmdManager.Toolbars.items():
cmdSet.update(cmds)
self.appendToolbar(name,[cmd.getName() for cmd in cmds])
self.appendToolbar('Assembly3 Selection', ["Std_SelBack",
"Std_SelForward","Std_LinkSelectLinked","Std_LinkSelectLinkedFinal",
self.appendToolbar('Assembly3 Navigation', ["Std_SelBack",
"Std_SelForward",AsmCmdGotoRelation.getName(),
"Std_LinkSelectLinked", "Std_LinkSelectLinkedFinal",
"Std_LinkSelectAllLinks","Std_TreeSelectAllInstances"])
for name,cmds in AsmCmdManager.Menus.items():
cmdSet.update(cmds)