Added shortcut to toggle axis display. Fixes #498.

This commit is contained in:
Leonardo Zide 2020-09-13 10:04:34 -07:00
parent 6a11c7295c
commit 33679e4f70
4 changed files with 20 additions and 0 deletions

View file

@ -1123,6 +1123,13 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
QT_TRANSLATE_NOOP("Status", "Toggle the view sphere"),
""
},
// LC_VIEW_TOGGLE_AXIS_ICON
{
QT_TRANSLATE_NOOP("Action", "View.ToggleAxisIcon"),
QT_TRANSLATE_NOOP("Menu", "Axis Icon"),
QT_TRANSLATE_NOOP("Status", "Toggle axis icon"),
""
},
// LC_VIEW_FADE_PREVIOUS_STEPS
{
QT_TRANSLATE_NOOP("Action", "View.FadePreviousSteps"),

View file

@ -176,6 +176,7 @@ enum lcCommandId
LC_VIEW_PROJECTION_ORTHO,
LC_VIEW_PROJECTION_LAST = LC_VIEW_PROJECTION_ORTHO,
LC_VIEW_TOGGLE_VIEW_SPHERE,
LC_VIEW_TOGGLE_AXIS_ICON,
LC_VIEW_FADE_PREVIOUS_STEPS,
LC_PIECE_INSERT,
LC_PIECE_DELETE,

View file

@ -1257,6 +1257,13 @@ void lcMainWindow::ToggleViewSphere()
UpdateAllViews();
}
void lcMainWindow::ToggleAxisIcon()
{
lcGetPreferences().mDrawAxes = !lcGetPreferences().mDrawAxes;
UpdateAllViews();
}
void lcMainWindow::ToggleFadePreviousSteps()
{
lcGetPreferences().mFadeSteps = !lcGetPreferences().mFadeSteps;
@ -2734,6 +2741,10 @@ void lcMainWindow::HandleCommand(lcCommandId CommandId)
ToggleViewSphere();
break;
case LC_VIEW_TOGGLE_AXIS_ICON:
ToggleAxisIcon();
break;
case LC_VIEW_FADE_PREVIOUS_STEPS:
ToggleFadePreviousSteps();
break;

View file

@ -296,6 +296,7 @@ public:
void SetShadingMode(lcShadingMode ShadingMode);
void SetSelectionMode(lcSelectionMode SelectionMode);
void ToggleViewSphere();
void ToggleAxisIcon();
void ToggleFadePreviousSteps();
void NewProject();