ENABLE_THUMBNAIL_GENERATOR -> Added ENABLE_THUMBNAIL_GENERATOR_DEBUG (disabled)

This commit is contained in:
Enrico Turri 2019-11-07 09:01:28 +01:00
parent a481102fd4
commit 1e8aa54559
3 changed files with 5 additions and 4 deletions

View File

@ -39,6 +39,7 @@
// Enable thumbnail generator
#define ENABLE_THUMBNAIL_GENERATOR (1 && ENABLE_2_2_0_ALPHA1)
#define ENABLE_THUMBNAIL_GENERATOR_DEBUG (0 && ENABLE_THUMBNAIL_GENERATOR)
#define ENABLE_THUMBNAIL_GENERATOR_PNG_TO_GCODE (1 && ENABLE_THUMBNAIL_GENERATOR)
#endif // _technologies_h_

View File

@ -1087,7 +1087,7 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
return res;
}
#if ENABLE_THUMBNAIL_GENERATOR
#if ENABLE_THUMBNAIL_GENERATOR_DEBUG
void GUI_App::gcode_thumbnails_debug()
{
const std::string BEGIN_MASK = "; thumbnail begin";
@ -1196,7 +1196,7 @@ void GUI_App::gcode_thumbnails_debug()
in_file.close();
}
}
#endif // ENABLE_THUMBNAIL_GENERATOR
#endif // ENABLE_THUMBNAIL_GENERATOR_DEBUG
void GUI_App::window_pos_save(wxTopLevelWindow* window, const std::string &name)
{

View File

@ -682,11 +682,11 @@ void MainFrame::init_menubar()
helpMenu->AppendSeparator();
append_menu_item(helpMenu, wxID_ANY, _(L("Keyboard Shortcuts")) + sep + "&?", _(L("Show the list of the keyboard shortcuts")),
[this](wxCommandEvent&) { wxGetApp().keyboard_shortcuts(); });
#if ENABLE_THUMBNAIL_GENERATOR
#if ENABLE_THUMBNAIL_GENERATOR_DEBUG
helpMenu->AppendSeparator();
append_menu_item(helpMenu, wxID_ANY, _(L("DEBUG gcode thumbnails")), _(L("DEBUG ONLY - read the selected gcode file and generates png for the contained thumbnails")),
[this](wxCommandEvent&) { wxGetApp().gcode_thumbnails_debug(); });
#endif // ENABLE_THUMBNAIL_GENERATOR
#endif // ENABLE_THUMBNAIL_GENERATOR_DEBUG
}
// menubar