mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Mouse capture when dragging gizmos
This commit is contained in:
		
							parent
							
								
									cda135ada7
								
							
						
					
					
						commit
						220d430956
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		|  | @ -3111,6 +3111,8 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) | |||
|     } | ||||
|     else if (evt.Dragging() && m_gizmos.is_dragging()) | ||||
|     { | ||||
|         m_canvas->CaptureMouse(); | ||||
| 
 | ||||
|         m_mouse.dragging = true; | ||||
|         m_gizmos.update(mouse_ray(pos)); | ||||
| 
 | ||||
|  | @ -3286,6 +3288,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) | |||
|         m_mouse.dragging = false; | ||||
|         m_toolbar_action_running = false; | ||||
|         m_dirty = true; | ||||
| 
 | ||||
|         if (m_canvas->HasCapture()) | ||||
|             m_canvas->ReleaseMouse(); | ||||
|     } | ||||
|     else if (evt.Moving()) | ||||
|     { | ||||
|  |  | |||
|  | @ -197,6 +197,8 @@ void GLGizmoBase::start_dragging() | |||
| 
 | ||||
| void GLGizmoBase::stop_dragging() | ||||
| { | ||||
|     set_tooltip(""); | ||||
| 
 | ||||
|     for (int i = 0; i < (int)m_grabbers.size(); ++i) | ||||
|     { | ||||
|         m_grabbers[i].dragging = false; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri