vector76 / cnc_gcodeviewer

Octoprint GCode Viewer for CNC machines
GNU Affero General Public License v3.0
3 stars 0 forks source link

use replaces for view model to avoid having to disable native tab #1

Closed jneilliii closed 2 years ago

jneilliii commented 2 years ago

hey @vector76 while reviewing the plugin I noticed you had a note about disabling the native gcode viewer plugin. you might consider using the replaces option of the get_template_configs callback.

I suggested this change for PrettyGCode plugin like this, but I think the id has changed since then from gcodeviewer to plugin_gcodeviewer now.

vector76 commented 2 years ago

Ok, I don't know how to do that but I will research it and see what I find.

vector76 commented 2 years ago

Alright, it was not trivial (for me) because I had name collisions (since I had just cloned the existing viewer), but I think this "replaces-viewmodel" approach is now implemented.

Thanks for the feedback, this is nicer, skipping the extra step of disabling the native viewer.