From 5affea57ae2e8ad86ce86402b2a2e852f3963e5d Mon Sep 17 00:00:00 2001 From: notdefine Date: Sun, 3 May 2009 07:59:24 +0000 Subject: [PATCH] cleanup git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1161 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/Preferences/ServerDialog.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/retroshare-gui/src/gui/Preferences/ServerDialog.cpp b/retroshare-gui/src/gui/Preferences/ServerDialog.cpp index 24442df3b..3aa9327a8 100644 --- a/retroshare-gui/src/gui/Preferences/ServerDialog.cpp +++ b/retroshare-gui/src/gui/Preferences/ServerDialog.cpp @@ -143,16 +143,14 @@ void ServerDialog::load() rsiface->lockData(); /* Lock Interface */ ui.totalRate->setValue(rsiface->getConfig().maxDataRate); + ui.indivRate->setValue(rsiface->getConfig().maxIndivDataRate); - // It makes no sense if the total Transfer rate is lower than the individual rate. - // Avoid this due setting uper limit for individual rate, and correct old wrong saved settings. - if (rsiface->getConfig().maxDataRate < rsiface->getConfig().maxIndivDataRate) { - ui.indivRate->setValue(rsiface->getConfig().maxDataRate); - } else { - ui.indivRate->setValue(rsiface->getConfig().maxIndivDataRate); - } - QObject::connect(ui.totalRate, SIGNAL (valueChanged(int)), - this, SLOT (setMaximumIndivRate(int))); + // It makes no sense to set the total transfer rate lower than the individual rate. + // Avoid this by setting the upper limit for individual rate to total transfer rate now, + // and every time the user changes the total transfer rate. + ui.indivRate->setMaximum(rsiface->getConfig().maxDataRate); + QObject::connect(ui.totalRate, SIGNAL (valueChanged(int)), + this, SLOT (setMaximumIndivRate(int))); rsiface->unlockData(); /* UnLock Interface */