trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
131 stars 19 forks source link

Open with system editor #673

Closed ErfinderDesRades closed 1 year ago

ErfinderDesRades commented 1 year ago

LPub3D does not use the system editor (notepad++) although it is activated in the "Open with" menu. Instead of it it always uses the internal editor.

Environment Version of LPub3D - 2.4.6.0.3111_20230111 Windows 11, Processor 12th Gen Intel(R) Core(TM) i7-12700H 2.70 GHz Architecture 64-Bit, 32 GB Ram Configuration LPub3D installation path Windows: C:\Program Files\LPub3D_246 Application data path Until now I couldn't find any workaround

Best regards and thanks a lot in advance.

trevorsandy commented 1 year ago

Thank your for reporting this behaviour.

I will take a look.

Can you precise the steps to reproduce as there are multiple use cases where the system editor is available.

For example, are you experiencing this behaviour when you use attempt to open the model file vial the 'Open With...' menu action, or are you attempting to open a parameter file using the system editor or are you attempting the open the current step model vial the context menu ?

The use cases I've attempted are working as expected so I'm not able to reproduce the behaviour you are experiencing.

Cheers,

ErfinderDesRades commented 1 year ago

Thank for your quick response.

This behaviour appears every time I try to edit textfiles.

When I try to edit parameter files it opens the file in the internal editor. In this editor there is a button "Open with System Editor"

image

When I use this one the file will be opened in notepad++.

Or is this the intended way? Maybe my expectation was wrong.

When I try to edit the code file, it will also be opended in the internal editor. In that editor there is no "Open with" button. When I use the "Open with" button from the context menu

image

the file will be opened in notepad++, but it will only show the parts without any LPub3D formatting

image

Hope this will clarify the issue.

BR from Bremen

trevorsandy commented 1 year ago

Thank you for the details.

When I try to edit parameter files it opens the file in the internal editor. In this editor there is a button "Open with System Editor"

To open a parameter using the designated system editor (the editor shown in the following shot)...

Screenshot - 25_01_2023 , 13_53_13

You must check the menu flag 'Use System Editor'

Screenshot - 25_01_2023 , 13_51_00

When 'Use System Editor' is not checked, this paremeter file editor 'Open With...' menu action will open a loaded file using the 'system assigned' program for the file extension. This means that the file will not necessarily be opened in a text editor.

I have changed this behaviour to use the designated system editor (when defined) for files with .mpd,.ldr,.dat, and .lst extension

When editing the current model file, I am currently loading the viewer content (versus the actual model file with meta commands) when the 'Open With...' action is selected in the detached default editor.

Screenshot - 25_01_2023 , 15_47_40

I have changed detached editor 'Open With...' menu action to open the the actual model file with meta commands.

If you wish to edit the current model file in the system editor, use this menu action:

Screenshot - 25_01_2023 , 13_53_13

or this one:

Screenshot - 25_01_2023 , 15_47_40

The 'Open With...' context menu action:

Screenshot - 25_01_2023 , 15_57_24

...is not intended to 'edit' the currently loaded submodel, rather it is intended to allow the editor view the currently loaded viewer content (content used to generate the current assembly image) which can be used to debug or otherwise troubleshoot errors and such.

Use the 'Edit ...' context menu action just above instead.

Cheers,

trevorsandy commented 1 year ago

The stated changes have been implemented.

Cheers,

ErfinderDesRades commented 1 year ago

Thanks a lot for your efforts.

Great app. Working really fine.

BR from Bremen

ErfinderDesRades commented 1 year ago

I must post another comment. Don't worry no more work for you.

I just would like to say thank you for doing all that work and making it accessible for everyone.

Great job. Great app.

trevorsandy commented 1 year ago

With pleasure.

Cheers,