SVN commit 1224716 by khudyakov: Remove scrollCount. Everything workd fine without it and it looks like an optimization hack and obscure thing quite a bit. CCMAIL: kstars-devel@kde.org M +1 -1 skymap.cpp M +0 -1 skymap.h M +0 -16 skymapevents.cpp --- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #1224715:1224716 @@ -133,7 +133,7 @@ SkyMap::SkyMap() : QGraphicsView( KStars::Instance() ), - computeSkymap(true), rulerMode(false), scrollCount(0), + computeSkymap(true), rulerMode(false), data( KStarsData::Instance() ), pmenu(0), ClickedObject(0), FocusObject(0), m_proj(0) { --- trunk/KDE/kdeedu/kstars/kstars/skymap.h #1224715:1224716 @@ -584,7 +584,6 @@ // false while rulerMode is true, it means we are measuring angular // distance. FIXME: Find a better way to do this bool starHopDefineMode; - int scrollCount; double y0; double m_Scale; --- trunk/KDE/kdeedu/kstars/kstars/skymapevents.cpp #1224715:1224716 @@ -98,7 +98,6 @@ arrowKeyPressed = true; slewing = true; - ++scrollCount; break; case Qt::Key_Right : @@ -112,7 +111,6 @@ arrowKeyPressed = true; slewing = true; - ++scrollCount; break; case Qt::Key_Up : @@ -128,7 +126,6 @@ arrowKeyPressed = true; slewing = true; - ++scrollCount; break; case Qt::Key_Down: @@ -144,7 +141,6 @@ arrowKeyPressed = true; slewing = true; - ++scrollCount; break; case Qt::Key_Plus: //Zoom in @@ -357,11 +353,8 @@ if ( arrowKeyPressed ) { stopTracking(); - if ( scrollCount > 10 ) { setDestination( *focus() ); - scrollCount = 0; } - } forceUpdate(); //need a total update, or slewing with the arrow keys doesn't work. } @@ -397,7 +390,6 @@ case Qt::Key_Up : //no break; continue to Qt::Key_Down case Qt::Key_Down : slewing = false; - scrollCount = 0; if ( Options::useAltAz() ) setDestinationAltAz( focus()->alt(), focus()->az() ); @@ -493,12 +485,7 @@ KSUtils::clamp( focus()->dec().Degrees() - dDec.Degrees() , -90.0 , 90.0 ) ); focus()->EquatorialToHorizontal( data->lst(), data->geo()->lat() ); } - - ++scrollCount; - if ( scrollCount > 4 ) { showFocusCoords(); - scrollCount = 0; - } //redetermine RA, Dec of mouse pointer, using new focus m_MousePoint = projector()->fromScreen( e->pos(), data->lst(), data->geo()->lat() ); @@ -547,8 +534,6 @@ } // if middle button was pressed unset here midMouseButtonDown = false; - - scrollCount = 0; } void SkyMap::mousePressEvent( QMouseEvent *e ) { @@ -576,7 +561,6 @@ if ( !mouseButtonDown ) { if ( e->button() == Qt::LeftButton ) { mouseButtonDown = true; - scrollCount = 0; } //determine RA, Dec of mouse pointer