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 ...@@ -146,19 +146,20 @@ namespace kt
return false; return false;
bool ok = false; bool ok = false;
Uint32 up,down; Limits & lim = limits[tc];
tc->getTrafficLimits(up,down);
if (index.column() == 1) switch (index.column())
down = value.toInt(&ok) * 1024; {
else case 1:
up = value.toInt(&ok) * 1024; lim.down = value.toInt(&ok) * 1024;
break;
case 2:
lim.up = value.toInt(&ok) * 1024;
break;
}
if (ok) if (ok)
{ {
Limits & lim = limits[tc];
lim.up = up;
lim.down = down;
emit dataChanged(index, index); emit dataChanged(index, index);
if (lim.up != lim.up_original || lim.down != lim.down_original) if (lim.up != lim.up_original || lim.down != lim.down_original)
enableApply(true); 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