Loading maphis/app.py +2 −1 Original line number Diff line number Diff line Loading @@ -257,6 +257,7 @@ class MAPHIS(QMainWindow): tool_obj: Tool = tool_cls(self.state) tool_obj.set_tool_id(len(self.tools)) self.tools.append(tool_obj) if tool_obj.auto_register: self.label_editor.register_tool(tool_obj) # for tool in plugin.tools: # self.label_editor.register_tool(tool) Loading maphis/common/action.py +4 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,10 @@ class Action: def initialize(self) -> typing.Tuple[bool, str]: return True, '' @property def auto_register(self) -> bool: return True class RegionComputation(Action): FOLDER = 'regions' Loading maphis/label_editor/label_editor.py +2 −1 Original line number Diff line number Diff line Loading @@ -268,6 +268,7 @@ class LabelEditor(QObject): def register_tools(self, tools: typing.List[Tool]): for tool in tools: if tool.auto_register: self.register_tool(tool) def register_tool(self, tool: Tool): Loading Loading
maphis/app.py +2 −1 Original line number Diff line number Diff line Loading @@ -257,6 +257,7 @@ class MAPHIS(QMainWindow): tool_obj: Tool = tool_cls(self.state) tool_obj.set_tool_id(len(self.tools)) self.tools.append(tool_obj) if tool_obj.auto_register: self.label_editor.register_tool(tool_obj) # for tool in plugin.tools: # self.label_editor.register_tool(tool) Loading
maphis/common/action.py +4 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,10 @@ class Action: def initialize(self) -> typing.Tuple[bool, str]: return True, '' @property def auto_register(self) -> bool: return True class RegionComputation(Action): FOLDER = 'regions' Loading
maphis/label_editor/label_editor.py +2 −1 Original line number Diff line number Diff line Loading @@ -268,6 +268,7 @@ class LabelEditor(QObject): def register_tools(self, tools: typing.List[Tool]): for tool in tools: if tool.auto_register: self.register_tool(tool) def register_tool(self, tool: Tool): Loading