Ensure that shift selection works even before the first click or key

press in the each folder by chanting the magic incantation:

setSelectionAnchor(currentItem());

in a few places.

CCMAIL: 66979-done@bugs.kde.org

svn path=/trunk/kdepim/; revision=265303
wilder-work
Till Adam 23 years ago
parent c541fd514f
commit 4921cda21f
  1. 4
      kmheaders.cpp

@ -817,6 +817,7 @@ void KMHeaders::reset(void)
setCurrentMsg(id);
setTopItemByIndex(top);
ensureCurrentItemVisible();
setSelectionAnchor( currentItem() );
}
//-----------------------------------------------------------------------------
@ -908,6 +909,7 @@ void KMHeaders::setFolder (KMFolder *aFolder, bool jumpToFirst)
updateMessageList();
setCurrentMsg(id);
setTopItemByIndex(top);
setSelectionAnchor( currentItem() );
} else {
if (mFolder) {
// WABA: Make sure that no KMReaderWin is still using a msg
@ -994,6 +996,7 @@ void KMHeaders::setFolder (KMFolder *aFolder, bool jumpToFirst)
END_TIMER(updateMsg);
SHOW_TIMER(updateMsg);
makeHeaderVisible();
setSelectionAnchor( currentItem() );
if (mFolder)
setFolderInfoStatus();
@ -1074,6 +1077,7 @@ void KMHeaders::msgChanged()
setTopItemByIndex( i );
setCurrentMsg(cur);
setSelected( currentItem(), true );
setSelectionAnchor( currentItem() );
connect(this,SIGNAL(currentChanged(QListViewItem*)),
this,SLOT(highlightMessage(QListViewItem*)));

Loading…
Cancel
Save