mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Only change dive coordinates on double click
Apparently this only happens on Windows, but there we would change the dive coordinates on a SINGLE click when editing a dive. With this change we simply bail if the event isn't a double click. Fixes #505 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									4243fcb915
								
							
						
					
					
						commit
						7a85b9fb27
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -289,7 +289,8 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U | |||
| 		lat = lat * 180 / M_PI; | ||||
| 	} | ||||
| 
 | ||||
| 	/* change everything on the selection. */ | ||||
| 	// right now we try to only ever do this with one dive selected,
 | ||||
| 	// but we keep the code here that changes the coordinates for each selected dive
 | ||||
| 	int i; | ||||
| 	struct dive *dive; | ||||
| 	for_each_dive(i, dive) { | ||||
|  | @ -306,6 +307,9 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U | |||
| 
 | ||||
| void GlobeGPS::mousePressEvent(QMouseEvent *event) | ||||
| { | ||||
| 	if (event->type() != QEvent::MouseButtonDblClick) | ||||
| 		return; | ||||
| 
 | ||||
| 	qreal lat, lon; | ||||
| 	bool clickOnGlobe = geoCoordinates(event->pos().x(), event->pos().y(), lon, lat, GeoDataCoordinates::Degree); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue