Do not allow maxfreq < minfreq
authorDaniel Klaffenbach <danielklaffenbach@gmail.com>
Tue, 13 Jul 2010 20:03:36 +0000 (22:03 +0200)
committerDaniel Klaffenbach <danielklaffenbach@gmail.com>
Tue, 13 Jul 2010 20:03:36 +0000 (22:03 +0200)
src/mainwindow.cpp

index faf34e4..4af5dca 100755 (executable)
@@ -105,6 +105,11 @@ void MainWindow::adjustFreq()
 {
     int newmax = getScalingFreq( ui->freq_adjust->sliderPosition() );
     QString max;
+
+    //maxfreq should not be smaller than minfreq, because we do not want to decrease minfreq
+    if (newmax < getMinFreq())
+       newmax = getMinFreq();
+
     max.setNum( newmax );
 
     callHelper( "set_maxfreq", max );