-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Gmoccapy: tooltable fixes #3706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Gmoccapy: tooltable fixes #3706
Conversation
Sigma1912
commented
Jan 18, 2026
- Restores the tooltips for [Delete, Add, Reload, Save] buttons
- Restores blocking the user from deleting the loaded tool
- Makes tooledit widget return a list rather than 'None' when multiple checkboxes are selected (required to check if loaded tool is among multiple selected tools)
- Hides current tool number display in the tooledit frame when the touch keyboard is not active
7f22530 to
57da7f7
Compare
|
Should be possible add to this PR functionality from #3474 ? |
I'll have a look |
| lbl_tool_text = "Tool loaded: " + str(toolnumber) | ||
| lbl_tool_text = "" | ||
| # When using touch keyboard we display the current tool in the tooltable frame | ||
| if self.widgets.chk_use_kb_on_tooledit.get_active(): | ||
| lbl_tool_text = "Tool loaded: " + str(toolnumber) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not always display the tool number of the current tool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a request to avoid having redundant information:
#3509 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. I disagree 🙃
|
No problem
Current behavior is that unsaved changes in the tool table are retained when leaving the tool table screen but the changed values are discarded when a tool change is executed and the saved offsets are used instead. |
|
I think the reolading is good idea. But I did not test it yet. |
👍
That would be the cleanest solution. |
2d5a5b9 to
eff3d22
Compare
|
I opted for the message popup as I prefer the user to be aware of what is going on. |
eff3d22 to
ffcaa40
Compare
|
It seems something went wrong. The first two commits doesn't belong in this PR and there is also a merge conflict... |
ffcaa40 to
d27a24e
Compare
|
And to be a bit pedantic - I would change the message "Discard changes?" (when changing a tool with unsaved changes) to "Change tool without saving changes/ and discard changes?" And the warning pop up could also be added for reload. |
I have not found a solution for that yet. |
d27a24e to
e217db4
Compare
|
Looks good now, thanks. Only the buildbot looks weird. |
|
Let me rebase that to master and see if that makes the buildbot/CI happy... |
e217db4 to
d42a12d
Compare
CI fails on Debian:Sid telling us that there no longer is a working c++ compiler: The rest of CI seems to work fine. Probably someone pushed an update to the CI infrastructure that broke stuff. |
|
Thank you. Is offset updated too? |
Not yet. I want to fix the obvious bugs first. |
Oh, did you mean the 'offset z' value? |
|
I think I've solved your questions in #3474.
First I wanted to write to you to make a popup question whether G43 should be executed when a value in the table is changed. But then I thought about it and I couldn't think of a situation where someone would change the offsets in the tooltable and still want to work with the old offsets. It would be stupid if the "save button" activated G43 when G49 was active, but my PR doesn't do that. Furthermore, during testing I found out that it should not be possible to change the tool diameter when G41 or G42 is on. The change should only be possible when G40 is on. |
|
Perhaps the command self.command.mdi("G43") could be replaced with a direct call. However, I don't know how and whether it is possible in Gmoccapy: https://linuxcnc.org/docs/devel/html/code/code-notes.html#_g_codes_affecting_tools
|
That is the thing I don't like about it. The GUI trying to guess what the user wants. I'd much prefer a popup when clicking the 'back' button with changes to the current tool offset. I have this mostly working but I'm out of time now.
Good point. |
If you adjust the wrong offsets, it will always be a problem. @hansu @andypugh Do you think reactivating G43 after changing offsets in the tooltable is a good idea?
G43 has different behavior compared to G41 G42. You can change G43 H1 => G43 H2, but you cant change G42 D1 => G42 D2. You must G42 D1 => G40 => G42 D2. |
|
I'm not saying that we cannot apply G43 on leaving the tool table with changed offsets for the tool in the spindle. What I want is for the operator to be notified about what is happening. |
|
I have no problem with the operator notification. |
- show message on leaving tool table with unsaved changes - reload tooltable from file when showing the table
…ng on saving tooltable
fd841dc to
354d91e
Compare
|
I pushed a fix to 5635759 as the 'Comments' column was not being checked for unsaved edits. |
Ideally the first column should be renamed 'Delete' but I have not found a way to do that yet as 'set_title' method is ignored. So it will have to be another message popup. |
|
I'm taking this from the perspective of a beginner learning to work with a CNC machine. I was in this situation recently. I change the offset, and nothing happens. Then I try to "save" and nothing happens again. As a beginner, it doesn't occur to me to "exit" to update the offsets. Or I would like to have some other option to trigger the reactivation of G43 in the tooltable environment. |
|
To hans: Note that if you have G43 activated and you change the offset to 0, then the next time you reactivate G43, G49 will be activated. This feature of LCNC confused me a lot when I was learning to work with offsets. |
|
Ah ok I didn't know/noticed that. My machine doesn't allow resp. it doesn't make sense to work with tool offsets. |
As the selection row is only used for deleting, maybe it would be better to highlight the current tool in another way like having the line bold. But not sure if that is possible. |
The idea was for the user to select the tool in the same way we select the offset in the offset page. |
Generally I'm not a great fan of GUIs that try to provide convenience functions for everything. The automatic reactivation of G43 after a tool change was also such a function until we got rid of it. IMO allowing the operator to change the tool table entry of the tool in the spindle with 'G43' active is a bit dubious. In the end all of these things could just as well be done by the operator in the MDI page with the added benefit of actually having to think whats happening. |
We didn't get rid of this feature, we just moved it to remap. This was due to the race condition and instability of this feature when it was in the GUI. "reactivation of G43 after a tool change" caused problems mainly with the combination of halui.mdicommands and multiple commands in mdi-commands (for example M6 T4 G4 P1). Reactivation of G43 in the tooltable is a different situation, I don't see any problem here.
I had similar thoughts. After the first crash of my friend's machine, I reevaluated everything. I don't know if you have a machine with an automatic tool changer and whether you use tool compensation. I'm sorry that I keep adding more and more requests, but on the other hand it makes sense. You're making Gmoccapy and tooltable better and better. I'm convinced that it makes sense. Please be patient with me. |
|
Should be possible change image "button delete"? Tooltip should be changed too. First tooltip "Select for delete", second tooltip "delete" |
|
Changing the tooltips is no problem. Changing icons is also possible but more work. |
Yes, why not. Not sure how easy it is to modify the checkbox to an icon button.
Original behavior was for this column to select the rows to delete and the tool to change to. I have not found a way to change the column title other than in the 'toolwidget.glade' file. |
|
According to this it is unfortunately not possible to replace the checkbox with a button: |










