2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

version 0.5.17 prepared: some crash fixes, multi media overview selection

This commit is contained in:
John Preston
2014-08-21 17:35:39 +04:00
parent 8a817eb204
commit 7bff0bcdb2
9 changed files with 27 additions and 21 deletions

View File

@@ -392,6 +392,7 @@ void OverviewInner::dragActionStart(const QPoint &screenPos, Qt::MouseButton but
_selected.insert(_dragItem, selStatus);
_dragAction = Selecting;
updateMsg(_dragItem, _dragItemIndex);
_overview->updateTopBarSelection();
} else {
_dragAction = PrepareSelect;
}
@@ -521,6 +522,7 @@ void OverviewInner::applyDragSelection() {
}
_dragSelFrom = _dragSelTo = 0;
_dragSelFromIndex = _dragSelToIndex = -1;
_overview->updateTopBarSelection();
}
QPoint OverviewInner::mapMouseToItem(QPoint p, MsgId itemId, int32 itemIndex) {
@@ -1562,11 +1564,13 @@ void OverviewWidget::updateTopBarSelection() {
int32 selectedForForward, selectedForDelete;
_inner.getSelectionState(selectedForForward, selectedForDelete);
_selCount = selectedForDelete ? selectedForDelete : selectedForForward;
App::main()->topBar()->showSelected(_selCount > 0 ? _selCount : 0);
if (!App::wnd()->layerShown()) {
if (App::main()) {
App::main()->topBar()->showSelected(_selCount > 0 ? _selCount : 0);
App::main()->topBar()->update();
}
if (App::wnd() && !App::wnd()->layerShown()) {
_inner.setFocus();
}
App::main()->topBar()->update();
update();
}
@@ -1652,6 +1656,8 @@ void OverviewWidget::fillSelectedItems(SelectedItemSet &sel, bool forDelete) {
}
OverviewWidget::~OverviewWidget() {
onClearSelected();
updateTopBarSelection();
}
void OverviewWidget::activate() {