linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #07171
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3325: Fix duplicate user rows in transfers
------------------------------------------------------------
revno: 3325
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2013-07-20 16:27:45 +0200
message:
Fix duplicate user rows in transfers
modified:
changelog.txt
dwt/include/dwt/widgets/TableTree.h
dwt/src/widgets/TableTree.cpp
win32/TransferView.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2013-07-19 16:24:10 +0000
+++ changelog.txt 2013-07-20 14:27:45 +0000
@@ -3,6 +3,7 @@
* [L#1194299] Prevent races when closing a connection (maksis, poy)
* [ADC] Send the LC (locale) parameter in INF
* [L#1197557] Fix collateral row deletions in transfers & searches (poy)
+* Fix duplicate user rows in transfers (poy)
* Icons in the plugin menu to show whether they are enabled (poy)
-- 0.825 2013-06-18 --
=== modified file 'dwt/include/dwt/widgets/TableTree.h'
--- dwt/include/dwt/widgets/TableTree.h 2013-07-05 21:25:29 +0000
+++ dwt/include/dwt/widgets/TableTree.h 2013-07-20 14:27:45 +0000
@@ -86,7 +86,7 @@
bool expanded;
Rectangle glyphRect;
Item();
- void switchExp(TableTree& w);
+ void redrawGlyph(TableTree& w);
};
std::unordered_map<LPARAM, Item> items;
std::unordered_map<LPARAM, LPARAM> children; // child -> parent cache
=== modified file 'dwt/src/widgets/TableTree.cpp'
--- dwt/src/widgets/TableTree.cpp 2013-07-05 21:25:29 +0000
+++ dwt/src/widgets/TableTree.cpp 2013-07-20 14:27:45 +0000
@@ -129,7 +129,8 @@
sendMsg(LVM_DELETEITEM, pos + 1, 0);
}
- items[parent].switchExp(*this);
+ items[parent].expanded = false;
+ items[parent].redrawGlyph(*this);
// special case, see TableTreeTest
if(n == 1 && pos == static_cast<int>(size()) - 1) {
@@ -152,16 +153,15 @@
resort();
- items[parent].switchExp(*this);
+ items[parent].expanded = true;
+ items[parent].redrawGlyph(*this);
}
TableTree::Item::Item() : expanded(false)
{
}
-void TableTree::Item::switchExp(TableTree& w) {
- expanded = !expanded;
-
+void TableTree::Item::redrawGlyph(TableTree& w) {
::RECT rect = glyphRect;
::InvalidateRect(w.handle(), &rect, FALSE);
}
@@ -373,8 +373,9 @@
}
cont.erase(std::remove(cont.begin(), cont.end(), child->first), cont.end());
if(cont.empty()) {
+ item.expanded = false;
item.glyphRect = Rectangle();
- item.switchExp(*this);
+ item.redrawGlyph(*this);
}
children.erase(child);
}
=== modified file 'win32/TransferView.cpp'
--- win32/TransferView.cpp 2013-06-17 20:17:48 +0000
+++ win32/TransferView.cpp 2013-07-20 14:27:45 +0000
@@ -801,7 +801,7 @@
removeConn(*conn);
if(ungroup) {
- transfers->erase(&parent.conns.front());
+ transfers->eraseChild(reinterpret_cast<LPARAM>(&parent.conns.front()));
}
}
}