Gscreen - a GTK / Glade / Python based screen

More
13 years 4 months ago #35465 by cmorley
Just pushed the fix for this.
please check for any problems ( though I tested what i could think of)

Thanks

Chris M

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago - 13 years 4 months ago #35468 by newbynobi
Halo Chris,

I added the following code to gmoccapy_handler.py
Code:
def _set_tool(self): liststore = self.widgets.tooledit1.model def match_tool(model, path, iter, pathlist): if model.get_value(iter, 1) == self.data.tool_in_spindle: pathlist.append(path) return False # keep the foreach going pathlist = [] liststore.foreach(match_tool, pathlist) # foreach works in a depth first fashion if len(pathlist) == 1: liststore.set_value(liststore.get_iter(pathlist[0]),0,1)

if I do enter the tool edit page, I call the code and get the tool in spindle marked, ready for editing.

I do beleave, it would be fine to add this to the widget itself as set_tool(self,toolnumber), what do you think?

Norbert
Last edit: 13 years 4 months ago by newbynobi.

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #35470 by newbynobi
Halo Chris,

I just checked your patch.

I could not find any more errors or strange behavior.

Norbert

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #35471 by cmorley
Thanks for testing Norbert.

Ok yes I added set_selected_tool(toolnumber) to the tooledit_widget

It also highlights the line.

Hope that's what you wanted.

Chris M

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #35472 by LAIR82
Is this regarding the tool offset patch??

Rick

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #35473 by cmorley
No. This is just about displaying tool information.
Norbert use the tooledit page to allow selecting of tool changes.
It's a neat deal.

Tool offset patch is a much deeper animal to do properly and is on going work.
It require me to learn much more about the depths of linuxcnc and that has bogged me down - never mind life in general :)

Chris M

Please Log in or Create an account to join the conversation.

Time to create page: 0.625 seconds
Powered by Kunena Forum