Show the name of the loaded G-code in the application title bar

This commit is contained in:
enricoturri1966 2020-11-02 14:10:34 +01:00
parent 9dbc0c6ba2
commit 6bf839b315

View File

@ -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()