Commit 7d8bd77b authored by Lars Kruse's avatar Lars Kruse

fix initialization of new processes

Previously the parameters for grid/spiral path patterns were invisible
for new processes. It was necessary to switching the path pattern type
or the path strategy to work around this issue.
Now another signal is emitted to unhide the path pattern paramters.
parent f31b3dd7
......@@ -187,8 +187,10 @@ class PathParamPattern(pycam.Plugins.PluginBase):
self.control.get_widget(), weight=5)
self.control.get_widget().connect("changed", lambda widget: \
self.core.emit_event("process-path-pattern-changed"))
self.core.register_event("process-path-pattern-list-changed",
self._update_selector)
self._event_handlers = (
("process-path-pattern-list-changed", self._update_selector),
("process-changed", "process-path-pattern-changed"))
self.register_event_handlers(self._event_handlers)
return True
def _get_value_converter(self, value):
......@@ -219,8 +221,7 @@ class PathParamPattern(pycam.Plugins.PluginBase):
def teardown(self):
self.core.unregister_ui("process_path_parameters", self.control.get_widget())
self.core.unregister_event("process-path-pattern-list-changed",
self._update_selector)
self.unregister_event_handlers(self._event_handlers)
self.core.get("unregister_parameter")("process", "path_pattern")
self.core.get("unregister_parameter_group")("path_pattern")
......
......@@ -240,6 +240,7 @@ class Processes(pycam.Plugins.ListPluginBase):
self.core.unblock_event("process-strategy-changed")
self.core.unblock_event("process-changed")
self.core.emit_event("process-strategy-changed")
self.core.emit_event("process-changed")
def _process_new(self, *args):
strategies = self.core.get("get_parameter_sets")("process").values()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment