GCodeProjects / GCodeWorkShop

GCodeWorkShop is text editor for CNC programmers.
GNU Lesser General Public License v3.0
20 stars 7 forks source link

Drag and drop #22

Closed Elitalak closed 5 months ago

Elitalak commented 1 year ago

Wold it be possible to add code so that drag and drop files into the editor could work?

u-235 commented 1 year ago

Hi.

Thanks for the wonderful idea.

A basic implementation is not difficult to do, but simple solutions are not always user friendly. The application needs to be able to detect the type of files being dragged and prompt the user for confirmation in cases of unsuitable types. And this can take some time.

I've made a basic drag-n-drop implementation that opens all dropped files, and you can test it on the drag-n-drop branch.

Elitalak commented 1 year ago

This works great! I am only going to drag and drop known nc-programs. Thanks for your fast response, i will test it more in the upcoming week and get back with feedback.

Elitalak commented 1 year ago

Hello! i have been testing this drag-n-drop for almost a week now and i am very happy with how it works.

u-235 commented 1 year ago

I'm still thinking of doing a simple filtering by file extension. The list of extensions is available in the settings and is also used in the open file dialog.

u-235 commented 5 months ago

completed at https://github.com/GCodeProjects/GCodeWorkShop/releases/tag/2024-05