Refactoring to allow to quickly build the various options to show the estimated printing time in gcode viewer scene

This commit is contained in:
enricoturri1966 2020-08-05 15:43:46 +02:00
parent 510e787bc7
commit 8fc5be7e4f
15 changed files with 125 additions and 174 deletions

View file

@ -204,13 +204,11 @@ void KBShortcutsDialog::fill_shortcuts()
{ "U", L("Upper Layer") },
{ "D", L("Lower Layer") },
{ "L", L("Show/Hide Legend") },
#if ENABLE_GCODE_VIEWER
#if ENABLE_GCODE_VIEWER_MODAL_TIME_ESTIMATE_DIALOG
{ "T", L("Show Estimated printing time") }
#else
#if GCODE_VIEWER_TIME_ESTIMATE == TIME_ESTIMATE_DEFAULT
{ "T", L("Show/Hide Estimated printing time") }
#endif // ENABLE_GCODE_VIEWER_MODAL_TIME_ESTIMATE_DIALOG
#endif // ENABLE_GCODE_VIEWER
#elif GCODE_VIEWER_TIME_ESTIMATE == TIME_ESTIMATE_MODAL
{ "T", L("Show Estimated printing time") }
#endif // GCODE_VIEWER_TIME_ESTIMATE
};
m_full_shortcuts.push_back(std::make_pair(_L("Preview"), preview_shortcuts));