Commit 47f67721 authored by Lars Kruse's avatar Lars Kruse

minor GUI cleanup

* hide "description" column of processes (not in use, yet)
* trigger control update for name changes of model/tool/process/bounds
parent 049b63dd
...@@ -373,6 +373,7 @@ class Bounds(pycam.Plugins.ListPluginBase): ...@@ -373,6 +373,7 @@ class Bounds(pycam.Plugins.ListPluginBase):
bounds = self.get_by_path(path) bounds = self.get_by_path(path)
if bounds and (new_text != bounds["name"]) and new_text: if bounds and (new_text != bounds["name"]) and new_text:
bounds["name"] = new_text bounds["name"] = new_text
self.core.emit_event("bounds-list-changed")
class BoundsDict(pycam.Plugins.ObjectWithAttributes): class BoundsDict(pycam.Plugins.ObjectWithAttributes):
......
...@@ -138,6 +138,7 @@ class Models(pycam.Plugins.ListPluginBase): ...@@ -138,6 +138,7 @@ class Models(pycam.Plugins.ListPluginBase):
model = self.get_by_path(path) model = self.get_by_path(path)
if model and (new_text != model["name"]) and new_text: if model and (new_text != model["name"]) and new_text:
model["name"] = new_text model["name"] = new_text
self.core.emit_event("model-list-changed")
def _visualize_model_name(self, column, cell, model, m_iter): def _visualize_model_name(self, column, cell, model, m_iter):
model_obj = self.get_by_path(model.get_path(m_iter)) model_obj = self.get_by_path(model.get_path(m_iter))
......
...@@ -132,6 +132,7 @@ class Processes(pycam.Plugins.ListPluginBase): ...@@ -132,6 +132,7 @@ class Processes(pycam.Plugins.ListPluginBase):
process = self.get_by_path(path) process = self.get_by_path(path)
if process and (new_text != process["name"]) and new_text: if process and (new_text != process["name"]) and new_text:
process["name"] = new_text process["name"] = new_text
self.core.emit_event("process-list-changed")
def _trigger_table_update(self): def _trigger_table_update(self):
self.gui.get_object("NameColumn").set_cell_data_func( self.gui.get_object("NameColumn").set_cell_data_func(
......
...@@ -171,6 +171,7 @@ class Tools(pycam.Plugins.ListPluginBase): ...@@ -171,6 +171,7 @@ class Tools(pycam.Plugins.ListPluginBase):
tool = self.get_by_path(path) tool = self.get_by_path(path)
if tool and (new_text != tool["name"]) and new_text: if tool and (new_text != tool["name"]) and new_text:
tool["name"] = new_text tool["name"] = new_text
self.core.emit_event("tool-list-changed")
def _edit_tool_id(self, cell, path, new_text): def _edit_tool_id(self, cell, path, new_text):
tool = self.get_by_path(path) tool = self.get_by_path(path)
......
...@@ -51,12 +51,13 @@ ...@@ -51,12 +51,13 @@
<child> <child>
<object class="GtkCellRendererText" id="NameCell"> <object class="GtkCellRendererText" id="NameCell">
<property name="editable">True</property> <property name="editable">True</property>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
<child> <child>
<object class="GtkTreeViewColumn" id="DescriptionColumn"> <object class="GtkTreeViewColumn" id="DescriptionColumn">
<property name="visible">False</property>
<property name="title">Description</property> <property name="title">Description</property>
<property name="expand">True</property> <property name="expand">True</property>
<child> <child>
......
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