Closed Bug 135148 Opened 22 years ago Closed 20 years ago

gDBView.selectMsgByKey always includes the currently displayed message

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows 95
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: sspitzer)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This doesn't look as if it's by design, and there's nowhere that it's currently
used so it doesn't show up yet, but selectMsgByKey selects the currently
displayed message as well as the given message. And I don't know an easy way to
clear the currently displayed message except by using
outlinerSelection.clearSelection();
outlinerView.selectionChanged();

I was trying to use this to save the key to select after a delete, because of
the problem with right-clicking a message after the current index to IMAP delete it.
Attached patch Proposed PatchSplinter Review
This seems to me as if it should work, but I can't test C++ changes :-(
Blocks: 133481
Keywords: patch, review
Neil, where are you using this function from?  We might have logic in the
dbview, that would be automagically invoked if someone used this from within
mailnews.
added David to the CC: list since he's a DBView expert.
I think Seth and Navin were most recently involved in this save and restore
selection handling. This fix does look right to me, in the sense that we don't
want the ::RestoreSelection code to be doing what it's doing with
m_currentlyDisplayedMsgKey. The alternative is to fix ::RestoreSelection to only
do what it's doing when m_currentlyDisplayedMsgKey is in aMsgKeyArray - it seems
like it would be wrong to do what it's doing when m_currentlyDisplayedMsgKey is
not in aMsgKeyArray
As I understand it save/restore selection is used for switching between
normal/threaded/search view so it doesn't want to change the selection.
That's why I thought the best place to change would be in selectMsgByKey.
QA Contact: olgam → laurel
Product: Browser → Seamonkey
Fixed by bug 186999.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: