Commit 641cb8cf authored by Joris Guisson's avatar Joris Guisson
Browse files

Backported speedlimits model editing fix


svn path=/branches/ktorrent/3.0/; revision=801439
parent 13bbbd95
......@@ -146,19 +146,20 @@ namespace kt
return false;
bool ok = false;
Uint32 up,down;
tc->getTrafficLimits(up,down);
if (index.column() == 1)
down = value.toInt(&ok) * 1024;
else
up = value.toInt(&ok) * 1024;
Limits & lim = limits[tc];
if (ok)
switch (index.column())
{
Limits & lim = limits[tc];
lim.up = up;
lim.down = down;
case 1:
lim.down = value.toInt(&ok) * 1024;
break;
case 2:
lim.up = value.toInt(&ok) * 1024;
break;
}
if (ok)
{
emit dataChanged(index, index);
if (lim.up != lim.up_original || lim.down != lim.down_original)
enableApply(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment