From 8c4c392cb8a47031402c215c31b3d67eafa5ad49 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 11 May 2018 14:41:21 +0200 Subject: [PATCH] Fixed enable/disable of the tooltips on GTK --- xs/src/slic3r/GUI/Field.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index 0fcf480e3..4febae362 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -183,14 +183,21 @@ namespace Slic3r { namespace GUI { //! to allow the default handling event.Skip(); //! eliminating the g-code pop up text description - temp->GetToolTip()->Enable(false); + bool flag = false; +#ifdef __WXGTK__ + // I have no idea why, but on GTK flag works in other way + flag = true; +#endif // __WXGTK__ + temp->GetToolTip()->Enable(flag); }), temp->GetId()); +#if !defined(__WXGTK__) temp->Bind(wxEVT_KILL_FOCUS, ([this, temp](wxEvent& e) { e.Skip();// on_kill_focus(e); temp->GetToolTip()->Enable(true); }), temp->GetId()); +#endif // __WXGTK__ temp->Bind(wxEVT_TEXT, ([this](wxCommandEvent) { on_change_field(); }), temp->GetId());