Commit cacea746 authored by Jason Harris's avatar Jason Harris
Browse files

backported fix from HEAD: single-clicking on an object would incorrectly

reset the object name in the Focus InfoBox.

svn path=/branches/KDE_3_1_BRANCH/kdeedu/kstars/; revision=221563
parent d87332eb
......@@ -40,6 +40,7 @@
#include "ksutils.h"
#include "skymap.h"
#include "imageviewer.h"
#include "infoboxes.h"
#include "addlinkdialog.h"
#if (QT_VERSION < 300)
......@@ -522,6 +523,9 @@ void SkyMap::slewFocus( void ) {
//Also, now that the focus has re-centered, engage tracking.
setFocus( destination() );
focus()->EquatorialToHorizontal( ksw->data()->LSTh, ksw->geo()->lat() );
if ( foundObject() )
ksw->infoBoxes()->focusObjChanged( foundObject()->translatedName() );
ksw->setHourAngle();
slewing = false;
......
......@@ -388,8 +388,11 @@ void SkyMap::mouseReleaseEvent( QMouseEvent * ) {
if (mouseMoveCursor) setDefaultMouseCursor(); // set default cursor
if (mouseButtonDown) { //false if double-clicked, becuase it's unset there.
mouseButtonDown = false;
setDestination( focus() );
slewing = false;
if ( slewing ) {
setDestination( focus() );
slewing = false;
}
setOldFocus( focus() );
Update(); // is needed because after moving the sky not all stars are shown
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment