diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-07-11 16:29:46 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-07-11 16:29:46 +0300 |
commit | 4c6c608342e92d6769205ea8b68bde7ebbef04d6 (patch) | |
tree | 8c2e507634184e4607970409fb6942d66fa656bf /src/slic3r/GUI/Plater.cpp | |
parent | f964f5e99a5f432569ce3e04a26a420a1490c7ae (diff) |
GLToolbar and GLToolbarItem refactored to allow two different actions when left/right clicking on items.
Stack dialog for undo and redo items is now shown on right click only
Diffstat (limited to 'src/slic3r/GUI/Plater.cpp')
-rw-r--r-- | src/slic3r/GUI/Plater.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index d8825ab3a..ea66d5f78 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3421,8 +3421,7 @@ void Plater::priv::init_view_toolbar() #endif // ENABLE_SVG_ICONS item.tooltip = _utf8(L("3D editor view")) + " [" + GUI::shortkey_ctrl_prefix() + "5]"; item.sprite_id = 0; - item.action_callback = [this]() { if (this->q != nullptr) wxPostEvent(this->q, SimpleEvent(EVT_GLVIEWTOOLBAR_3D)); }; - item.is_toggable = false; + item.left_action_callback = [this]() { if (this->q != nullptr) wxPostEvent(this->q, SimpleEvent(EVT_GLVIEWTOOLBAR_3D)); }; if (!view_toolbar.add_item(item)) return; @@ -3432,8 +3431,7 @@ void Plater::priv::init_view_toolbar() #endif // ENABLE_SVG_ICONS item.tooltip = _utf8(L("Preview")) + " [" + GUI::shortkey_ctrl_prefix() + "6]"; item.sprite_id = 1; - item.action_callback = [this]() { if (this->q != nullptr) wxPostEvent(this->q, SimpleEvent(EVT_GLVIEWTOOLBAR_PREVIEW)); }; - item.is_toggable = false; + item.left_action_callback = [this]() { if (this->q != nullptr) wxPostEvent(this->q, SimpleEvent(EVT_GLVIEWTOOLBAR_PREVIEW)); }; if (!view_toolbar.add_item(item)) return; |