FIX:fixed the side menu popup cannot be selected on macos 13
Change-Id: Ic4e9182a1a7175b89f37114b3857e813f299989d
This commit is contained in:
parent
e32792c305
commit
51deb70f64
|
@ -3827,7 +3827,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||||
while (p->GetParent())
|
while (p->GetParent())
|
||||||
p = p->GetParent();
|
p = p->GetParent();
|
||||||
auto *top_level_wnd = dynamic_cast<wxTopLevelWindow*>(p);
|
auto *top_level_wnd = dynamic_cast<wxTopLevelWindow*>(p);
|
||||||
if (top_level_wnd && top_level_wnd->IsActive())
|
if (top_level_wnd && top_level_wnd->IsActive() && !wxGetApp().get_side_menu_popup_status())
|
||||||
m_canvas->SetFocus();
|
m_canvas->SetFocus();
|
||||||
m_mouse.position = pos.cast<double>();
|
m_mouse.position = pos.cast<double>();
|
||||||
m_tooltip_enabled = false;
|
m_tooltip_enabled = false;
|
||||||
|
|
|
@ -2908,6 +2908,16 @@ void GUI_App::set_label_clr_sys(const wxColour& clr)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GUI_App::get_side_menu_popup_status()
|
||||||
|
{
|
||||||
|
return m_side_popup_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI_App::set_side_menu_popup_status(bool status)
|
||||||
|
{
|
||||||
|
m_side_popup_status = status;
|
||||||
|
}
|
||||||
|
|
||||||
bool GUI_App::tabs_as_menu() const
|
bool GUI_App::tabs_as_menu() const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -282,6 +282,7 @@ private:
|
||||||
bool enable_sync = false;
|
bool enable_sync = false;
|
||||||
bool m_is_dark_mode{ false };
|
bool m_is_dark_mode{ false };
|
||||||
bool m_adding_script_handler { false };
|
bool m_adding_script_handler { false };
|
||||||
|
bool m_side_popup_status{false};
|
||||||
public:
|
public:
|
||||||
std::string get_local_models_path();
|
std::string get_local_models_path();
|
||||||
bool OnInit() override;
|
bool OnInit() override;
|
||||||
|
@ -336,6 +337,9 @@ public:
|
||||||
void update_fonts(const MainFrame *main_frame = nullptr);
|
void update_fonts(const MainFrame *main_frame = nullptr);
|
||||||
void set_label_clr_modified(const wxColour& clr);
|
void set_label_clr_modified(const wxColour& clr);
|
||||||
void set_label_clr_sys(const wxColour& clr);
|
void set_label_clr_sys(const wxColour& clr);
|
||||||
|
//update side popup status
|
||||||
|
bool get_side_menu_popup_status();
|
||||||
|
void set_side_menu_popup_status(bool status);
|
||||||
|
|
||||||
const wxColour& get_label_clr_modified(){ return m_color_label_modified; }
|
const wxColour& get_label_clr_modified(){ return m_color_label_modified; }
|
||||||
const wxColour& get_label_clr_sys() { return m_color_label_sys; }
|
const wxColour& get_label_clr_sys() { return m_color_label_sys; }
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "Label.hpp"
|
#include "Label.hpp"
|
||||||
|
|
||||||
#include <wx/dcgraph.h>
|
#include <wx/dcgraph.h>
|
||||||
|
#include "../GUI_App.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +18,6 @@ SidePopup::SidePopup(wxWindow* parent)
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
SetDoubleBuffered(true);
|
SetDoubleBuffered(true);
|
||||||
#endif //__WINDOWS__
|
#endif //__WINDOWS__
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SidePopup::~SidePopup()
|
SidePopup::~SidePopup()
|
||||||
|
@ -27,6 +27,7 @@ SidePopup::~SidePopup()
|
||||||
|
|
||||||
void SidePopup::OnDismiss()
|
void SidePopup::OnDismiss()
|
||||||
{
|
{
|
||||||
|
Slic3r::GUI::wxGetApp().set_side_menu_popup_status(false);
|
||||||
wxPopupTransientWindow::OnDismiss();
|
wxPopupTransientWindow::OnDismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,6 +65,7 @@ void SidePopup::Popup(wxWindow* focus)
|
||||||
else
|
else
|
||||||
Position(pos, {0, focus->GetSize().y + 12});
|
Position(pos, {0, focus->GetSize().y + 12});
|
||||||
}
|
}
|
||||||
|
Slic3r::GUI::wxGetApp().set_side_menu_popup_status(true);
|
||||||
wxPopupTransientWindow::Popup();
|
wxPopupTransientWindow::Popup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue