mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-13 05:01:50 +08:00
Fix of commit 95fc0545907a8e533e6e8343d0ebb0843eacbb95
Revert back previous deleted assert. It is usefull
This commit is contained in:
parent
3af58a27f3
commit
fdf8ebed7f
@ -65,7 +65,7 @@ GLGizmoBase::GLGizmoBase(GLCanvas3D& parent, const std::string& icon_filename, u
|
||||
: m_parent(parent)
|
||||
, m_group_id(-1)
|
||||
, m_state(Off)
|
||||
, m_shortcut_key(0)
|
||||
, m_shortcut_key(NO_SHORTCUT_KEY_VALUE)
|
||||
, m_icon_filename(icon_filename)
|
||||
, m_sprite_id(sprite_id)
|
||||
, m_hover_id(-1)
|
||||
@ -213,10 +213,12 @@ void GLGizmoBase::render_input_window(float x, float y, float bottom_limit)
|
||||
|
||||
std::string GLGizmoBase::get_name(bool include_shortcut) const
|
||||
{
|
||||
int key = get_shortcut_key();
|
||||
std::string out = on_get_name();
|
||||
if (include_shortcut && key >= WXK_CONTROL_A && key <= WXK_CONTROL_Z)
|
||||
out += std::string(" [") + char(int('A') + key - int(WXK_CONTROL_A)) + "]";
|
||||
if (!include_shortcut) return out;
|
||||
|
||||
int key = get_shortcut_key();
|
||||
assert(key==NO_SHORTCUT_KEY_VALUE || (key >= WXK_CONTROL_A && key <= WXK_CONTROL_Z));
|
||||
out += std::string(" [") + char(int('A') + key - int(WXK_CONTROL_A)) + "]";
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,9 @@ public:
|
||||
// (254 is choosen to leave some space for forward compatibility)
|
||||
static const unsigned int BASE_ID = 255 * 255 * 254;
|
||||
|
||||
// Represents NO key(button on keyboard) value
|
||||
static const int NO_SHORTCUT_KEY_VALUE = 0;
|
||||
|
||||
protected:
|
||||
struct Grabber
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user