File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ class ToolbarAdapter:
23
23
params = None
24
24
25
25
def __init__ (self ):
26
- if self .params is None :
27
- self .params = fci .ParamGet ("User parameter:BaseApp/Workbench/Global/Toolbar" )
28
26
if fci .FreeCAD is None :
29
27
raise RuntimeError ("ToolbarAdapter can only be used when run from within FreeCAD" )
28
+ if self .params is None :
29
+ self .params = fci .FreeCAD .ParamGet ("User parameter:BaseApp/Workbench/Global/Toolbar" )
30
30
31
31
def get_toolbars (self ):
32
32
"""Get a list of toolbars: the result is a set of parameter groups, each representing a toolbar."""
@@ -45,7 +45,7 @@ def create_new_custom_toolbar(self):
45
45
# unique.
46
46
47
47
# First, the displayed name
48
- custom_toolbar_name = QT_TRANSLATE_NOOP ("Workbench" , "Auto-Created Macro Toolbar" )
48
+ custom_toolbar_name = str ( QT_TRANSLATE_NOOP ("Workbench" , "Auto-Created Macro Toolbar" ) )
49
49
custom_toolbars = self .params .GetGroups ()
50
50
name_taken = self .check_for_toolbar (custom_toolbar_name )
51
51
if name_taken :
You can’t perform that action at this time.
0 commit comments