Skip to content

Commit

Permalink
Fixed cursor flickering on intensive ContactListDragView invalidations.
Browse files Browse the repository at this point in the history
  • Loading branch information
mblsha committed Feb 26, 2010
1 parent c919eb3 commit c35353f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/contactlistdragview.cpp
Expand Up @@ -187,7 +187,8 @@ void ContactListDragView::updateCursorMouseHover()

bool ContactListDragView::updateCursor(const QModelIndex& index, UpdateCursorOrigin origin, bool force)
{
if (isContextMenuVisible() ||
if (backedUpVerticalScrollBarValue_ != -1 ||
isContextMenuVisible() ||
extendedSelectionAllowed() ||
state() != NoState)
{
Expand Down Expand Up @@ -785,10 +786,10 @@ void ContactListDragView::restoreBackedUpSelection()
{
restoreSelection(backedUpSelection_);

// if (backedUpSelection_) {
// delete backedUpSelection_;
// backedUpSelection_ = 0;
// }
if (backedUpSelection_) {
delete backedUpSelection_;
backedUpSelection_ = 0;
}
}

void ContactListDragView::modelChanged()
Expand Down Expand Up @@ -827,6 +828,7 @@ void ContactListDragView::doItemsLayoutFinish()
{
if (backedUpVerticalScrollBarValue_ != -1) {
verticalScrollBar()->setValue(backedUpVerticalScrollBarValue_);
backedUpVerticalScrollBarValue_ = -1;
}
}

Expand All @@ -853,9 +855,8 @@ void ContactListDragView::doItemsLayout()
model->groupState()->restoreGroupExpandedState(groupExpandedState);
updateGroupExpandedState();

doItemsLayoutFinish();

restoreBackedUpSelection();
doItemsLayoutFinish();

if (!backedUpEditorValue_.isNull()) {
// QSortFilterProxyModel* proxyModel = dynamic_cast<QSortFilterProxyModel*>(model);
Expand Down

0 comments on commit c35353f

Please sign in to comment.