Cube keeps rotating when mouse is at left or right screen edge.
BUG: 182454 svn path=/trunk/KDE/kdebase/workspace/; revision=930054
This commit is contained in:
parent
baa3d7a1a5
commit
b428fb46a0
1 changed files with 7 additions and 0 deletions
|
@ -2062,6 +2062,13 @@ void CubeEffect::mouseChanged( const QPoint& pos, const QPoint& oldpos, Qt::Mous
|
|||
// display width corresponds to sum of angles of the polyhedron
|
||||
int deltaX = oldpos.x() - pos.x();
|
||||
float deltaDegrees = (float)deltaX/rect.width() * 360.0f;
|
||||
if( deltaX == 0 )
|
||||
{
|
||||
if( pos.x() == 0 )
|
||||
deltaDegrees = 5.0f;
|
||||
if( pos.x() == displayWidth() -1 )
|
||||
deltaDegrees = -5.0f;
|
||||
}
|
||||
if( invertMouse )
|
||||
manualAngle += deltaDegrees;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue