Editing gcode files

More
30 Sep 2020 20:24 #184412 by persei8
Editing gcode files was created by persei8
Background - In my qtdragon handler there are 2 gcode_editor widgets. One is for viewing only and the other is for editing. There is a button to set the widget into edit mode.
According to gcode_editor.py, pressing new or open or save should pop up a dialog box to get a filename. However, no dialogs appear. Am I supposed to class patch those functions and handle them in the handler?
Also, why is editing disabled in Manual mode? The processed_key_event method bypasses key presses to the gcode widgets if in manual mode. Thank you.

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

More
30 Sep 2020 21:25 #184424 by cmorley
Replied by cmorley on topic Editing gcode files
open and save buttons were built with pop up dialogs in mind.
If you have not included file dialogs in the screenoptions widget nothing will happen.
You can class patch if you prefer a different method of saving/loading.

Editing is disabled in manual mode because most screens allow keyboard jogging and its easy to have the wrong thing happen. IIRC qtdragon does not support keyboard jogging so you could change the processed_key_event method to allow it.

Chris
The following user(s) said Thank You: persei8

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

More
30 Sep 2020 21:43 #184426 by persei8
Replied by persei8 on topic Editing gcode files
My bad. I did not have file dialogs enabled because I make my own. Keyboard jogging is an option in the settings page so I could do some workarounds with that if necessary. Now that I mention it, it's called 'keyboard shortcuts', I should probably rename it or make a separate entry specifically for jogging.
PS - opening a stylesheet now works properly in python2.7
Jim

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

More
30 Sep 2020 23:54 #184437 by cmorley
Replied by cmorley on topic Editing gcode files
glad the stylesheets work now thanks for mentioning.
The jogging problem comes from using cursor keys for jogging and editting - I've mve an axis by being in the wrong focus when I pressed the cursor key or wondered why the axis didn't move for the same reason.
I don't like keyboard jogging for these reasons but it's very convenient for testing and running machines with unfinished jog controls. I like your settings idea for it.

Has your private version diverged a lot from linuxcnc's ?
2.8 is mostly bug fix only but master could be updated.
hottabitch has many versions/different ideas too.
I was kinda waiting to hear from users about qtvcp screens and waiting till python3 is complete before doing any majour changes.

It must be popular - seems every other version I see is based on QtDragon.
In the future I would like to get rid of the extra motion pins for probing and
I do like Phills camview mods
Chris

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

More
01 Oct 2020 04:21 #184449 by persei8
Replied by persei8 on topic Editing gcode files
I make periodic updates to github that are not in the 2.8 version but they are nothing major, mostly bug fixes as I find them, like this gcode_editor issue. I changed the code by removing the check for manual mode from processed_key_event and doing it when the edit button is pressed. This way, I can allow editing while in manual mode but only if the Use_keyboard_shortcuts option is unchecked. However, you could still jog with the mouse and (probably touching the jog buttons on a touchscreen) so maybe I should just disable the jog buttons instead. I just find it inconvenient to switch to MDI mode to edit a file. Another option is to put it back the way you had it and just add a status message explaining why you can't edit a file. I will go with whatever is most conventional.

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

Moderators: cmorley
Time to create page: 0.082 seconds
Powered by Kunena Forum