[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/kstars/kstars
From: Alexey Khudyakov <alexey.skladnoy () gmail ! com>
Date: 2011-03-11 16:55:54
Message-ID: 20110311165554.45DB4AC8C7 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1224501 by khudyakov:
ZoomRect was invalidated in both branches
Just set modMouseButton to false
M +9 -14 skymapevents.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skymapevents.cpp #1224500:1224501
@@ -525,27 +525,21 @@
void SkyMap::mouseReleaseEvent( QMouseEvent * ) {
if ( ZoomRect.isValid() ) {
- //Zoom in on center of Zoom Circle, by a factor equal to the ratio
- //of the sky pixmap's width to the Zoom Circle's diameter
- float factor = float(width()) / float(ZoomRect.width());
-
stopTracking();
-
SkyPoint newcenter = projector()->fromScreen( ZoomRect.center(), data->lst(), data->geo()->lat() );
-
setFocus( &newcenter );
setDestination( &newcenter );
- setDefaultMouseCursor();
+ //Zoom in on center of Zoom Circle, by a factor equal to the ratio
+ //of the sky pixmap's width to the Zoom Circle's diameter
+ float factor = float(width()) / float(ZoomRect.width());
setZoomFactor( Options::zoomFactor() * factor );
-
- ZoomRect = QRect(); //invalidate ZoomRect
- } else {
- setDefaultMouseCursor();
- ZoomRect = QRect(); //just in case user Ctrl+clicked + released w/o dragging...
}
+ setDefaultMouseCursor();
+ ZoomRect = QRect(); //invalidate ZoomRect
- if (mouseMoveCursor) setDefaultMouseCursor(); // set default cursor
+ if( mouseMoveCursor )
+ setDefaultMouseCursor(); // set default cursor
if (mouseButtonDown) { //false if double-clicked, because it's unset there.
mouseButtonDown = false;
if ( slewing ) {
@@ -558,7 +552,8 @@
}
forceUpdate(); // is needed because after moving the sky not all stars are shown
}
- if ( midMouseButtonDown ) midMouseButtonDown = false; // if middle button was pressed unset here
+ // if middle button was pressed unset here
+ midMouseButtonDown = false;
scrollCount = 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic