mirror of
https://github.com/wassname/sloth.git
synced 2026-07-07 16:17:32 +08:00
save reference to the labeltool in the command
This commit is contained in:
+1
-1
@@ -97,7 +97,7 @@ class BaseCommand(object):
|
||||
|
||||
def __init__(self):
|
||||
#self.style = color_style()
|
||||
pass
|
||||
self.labeltool = None
|
||||
|
||||
def usage(self, subcommand):
|
||||
"""
|
||||
|
||||
@@ -161,6 +161,10 @@ class LabelTool(QObject):
|
||||
else:
|
||||
# TODO implement load_command_class
|
||||
klass = load_command_class(app_name, subcommand)
|
||||
|
||||
# set labeltool reference
|
||||
klass.labeltool = self
|
||||
|
||||
return klass
|
||||
|
||||
def init_from_config(self, config_module_path=""):
|
||||
|
||||
Reference in New Issue
Block a user