From 6bf839b3156c12db4a519d133015cb4e9a120da0 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Mon, 2 Nov 2020 14:10:34 +0100 Subject: [PATCH] Show the name of the loaded G-code in the application title bar --- src/slic3r/GUI/Plater.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 5e8e06625..3bdfa7b1c 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -4729,9 +4729,13 @@ void Plater::load_gcode(const wxString& filename) p->preview->reload_print(false); p->preview->get_canvas3d()->zoom_to_gcode(); - if (p->preview->get_canvas3d()->get_gcode_layers_zs().empty()) + if (p->preview->get_canvas3d()->get_gcode_layers_zs().empty()) { wxMessageDialog(this, _L("The selected file") + ":\n" + filename + "\n" + _L("does not contain valid gcode."), wxString(GCODEVIEWER_APP_NAME) + " - " + _L("Error while loading .gcode file"), wxCLOSE | wxICON_WARNING | wxCENTRE).ShowModal(); + set_project_filename(wxEmptyString); + } + else + set_project_filename(filename); } void Plater::refresh_print()