summaryrefslogtreecommitdiff
path: root/core/applets/rotateapplet/rotate.cpp
Side-by-side diff
Diffstat (limited to 'core/applets/rotateapplet/rotate.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/applets/rotateapplet/rotate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp
index 8f323d6..653c61f 100644
--- a/core/applets/rotateapplet/rotate.cpp
+++ b/core/applets/rotateapplet/rotate.cpp
@@ -41,7 +41,6 @@ RotateApplet::RotateApplet ( )
: QObject ( 0, "RotateApplet" ), ref ( 0 )
{
m_native = true;
- m_startupRot = QPEApplication::defaultRotation();
}
RotateApplet::~RotateApplet ( )
@@ -90,11 +89,12 @@ QPopupMenu *RotateApplet::popup ( QWidget * ) const
void RotateApplet::activated ( )
{
+ int currentRotation = QPEApplication::defaultRotation();
int newRotation;
if ( m_native == true ) {
- newRotation = m_startupRot + 90;
+ newRotation = currentRotation + 90;
} else {
- newRotation = m_startupRot;
+ newRotation = currentRotation - 90;
}
QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" );
env << newRotation;