Allow letter "T" for open text gizmo

This commit is contained in:
Filip Sykala - NTB T15p 2022-12-05 16:52:35 +01:00
parent 47ca06e53e
commit 2168d0935a
2 changed files with 10 additions and 0 deletions

View File

@ -526,6 +526,7 @@ bool GLGizmoEmboss::on_init()
m_rotate_gizmo.init();
ColorRGBA gray_color(.6f, .6f, .6f, .3f);
m_rotate_gizmo.set_highlight_color(gray_color);
m_shortcut_key = WXK_CONTROL_T;
return true;
}
@ -771,6 +772,14 @@ void GLGizmoEmboss::on_set_state()
// Try(when exist) set text configuration by volume
set_volume(priv::get_selected_volume(m_parent.get_selection()));
// when open window by "T" and no valid volume is selected, so Create new one
if (m_volume == nullptr) {
// reopen gizmo when new object is created
GLGizmoBase::m_state = GLGizmoBase::Off;
// start creating new object
create_volume(ModelVolumeType::MODEL_PART);
}
// change position of just opened emboss window
if (m_allow_float_window)
m_set_window_offset = priv::calc_fine_position(m_parent.get_selection(), get_minimal_window_size(), m_parent.get_canvas_size());

View File

@ -154,6 +154,7 @@ void KBShortcutsDialog::fill_shortcuts()
{ "L", L("Gizmo FDM paint-on supports") },
{ "P", L("Gizmo FDM paint-on seam") },
{ "N", L("Gizmo Multi Material painting") },
{ "T", L("Gizmo Text emboss / engrave")},
{ "Esc", L("Unselect gizmo or clear selection") },
{ "K", L("Change camera type (perspective, orthographic)") },
{ "B", L("Zoom to Bed") },