mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	FIX:fixed the side menu popup cannot be selected on macos 13
Change-Id: Ic4e9182a1a7175b89f37114b3857e813f299989d
This commit is contained in:
		
							parent
							
								
									e32792c305
								
							
						
					
					
						commit
						51deb70f64
					
				
					 4 changed files with 18 additions and 2 deletions
				
			
		|  | @ -3827,7 +3827,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) | |||
|             while (p->GetParent()) | ||||
|                 p = p->GetParent(); | ||||
|             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_mouse.position = pos.cast<double>(); | ||||
|             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 | ||||
| { | ||||
|     return false; | ||||
|  |  | |||
|  | @ -282,6 +282,7 @@ private: | |||
|     bool             enable_sync = false; | ||||
|     bool             m_is_dark_mode{ false }; | ||||
|     bool             m_adding_script_handler { false }; | ||||
|     bool             m_side_popup_status{false}; | ||||
| public: | ||||
|     std::string     get_local_models_path(); | ||||
|     bool            OnInit() override; | ||||
|  | @ -336,6 +337,9 @@ public: | |||
| 	void            update_fonts(const MainFrame *main_frame = nullptr); | ||||
|     void            set_label_clr_modified(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_sys()     { return m_color_label_sys; } | ||||
|  |  | |||
|  | @ -2,6 +2,7 @@ | |||
| #include "Label.hpp" | ||||
| 
 | ||||
| #include <wx/dcgraph.h> | ||||
| #include "../GUI_App.hpp" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | @ -17,7 +18,6 @@ SidePopup::SidePopup(wxWindow* parent) | |||
| #ifdef __WINDOWS__ | ||||
|     SetDoubleBuffered(true); | ||||
| #endif //__WINDOWS__
 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| SidePopup::~SidePopup() | ||||
|  | @ -27,6 +27,7 @@ SidePopup::~SidePopup() | |||
| 
 | ||||
| void SidePopup::OnDismiss() | ||||
| { | ||||
|     Slic3r::GUI::wxGetApp().set_side_menu_popup_status(false); | ||||
|     wxPopupTransientWindow::OnDismiss(); | ||||
| } | ||||
| 
 | ||||
|  | @ -64,6 +65,7 @@ void SidePopup::Popup(wxWindow* focus) | |||
|         else | ||||
|             Position(pos, {0, focus->GetSize().y + 12}); | ||||
|     } | ||||
|     Slic3r::GUI::wxGetApp().set_side_menu_popup_status(true); | ||||
|     wxPopupTransientWindow::Popup(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tao wang
						tao wang