2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

a couple of crashes fixed, version 0.9.24 stable

This commit is contained in:
John Preston
2016-02-16 16:14:19 +03:00
parent a597ded99b
commit 80455492b0
8 changed files with 41 additions and 34 deletions

View File

@@ -1821,19 +1821,25 @@ void OverviewInner::itemRemoved(HistoryItem *item) {
_overview->updateTopBarSelection();
}
onUpdateSelected();
LayoutItems::iterator j = _layoutItems.find(item);
if (j != _layoutItems.cend()) {
int32 index = _items.indexOf(j.value());
if (index >= 0) {
_items.remove(index);
}
delete j.value();
_layoutItems.erase(j);
}
if (_dragSelFrom == msgId) {
if (_dragSelFrom == msgId || _dragSelTo == msgId) {
_dragSelFrom = 0;
_dragSelFromIndex = -1;
}
if (_dragSelTo == msgId) {
_dragSelTo = 0;
_dragSelToIndex = -1;
update();
}
updateDragSelection(_dragSelFrom, _dragSelFromIndex, _dragSelTo, _dragSelToIndex, _dragSelecting);
update();
onUpdateSelected();
}
void OverviewInner::repaintItem(const HistoryItem *msg) {