Do not set maxfreq twice
authorDaniel Klaffenbach <danielklaffenbach@gmail.com>
Tue, 5 Oct 2010 19:21:37 +0000 (21:21 +0200)
committerDaniel Klaffenbach <danielklaffenbach@gmail.com>
Tue, 5 Oct 2010 19:21:37 +0000 (21:21 +0200)
src/mainwindow.cpp

index 3c3b98a..c9fecb4 100644 (file)
@@ -110,6 +110,12 @@ void MainWindow::about()
 void MainWindow::adjustFreq()
 {
     int newmax = getScalingFreq( ui->freq_adjust->sliderPosition() );
+
+    if (newmax == getMaxFreq() ) {
+        //we do not need to change anything in this case
+        return;
+    }
+
     QString max;
 
     //maxfreq should not be smaller than minfreq, because we do not want to decrease minfreq
@@ -461,7 +467,7 @@ void MainWindow::setSmartReflex()
     if ( getSmartReflexState() == 1 )
         callHelper( "set_sr", "off");
     else {
-        QMaemo5InformationBox::information(this, tr( "SmartReflex support is known to be unstable on some devices and may cause random reboots." ));
+        QMaemo5InformationBox::information(this, tr( "SmartReflex support is known to be unstable on some devices and may cause random reboots." ), 0);
         callHelper( "set_sr", "on");
     }