fix for #118276. multiple selection in the addressbook should

clear out the card preview pane.  r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2002-01-05 03:48:41 +00:00
Родитель de6758169d
Коммит d52a95d26f
3 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -74,7 +74,7 @@ function AbResultsPaneOnClick(event)
AbResultsPaneDoubleClick(gAbView.getCardFromRow(row.value));
}
else {
OnClickedCard(gAbView.getCardFromRow(row.value));
UpdateCardView();
}
}
}

Просмотреть файл

@ -218,17 +218,19 @@ function ResultsPaneSelectionChanged()
function UpdateCardView()
{
var card = GetSelectedCard();
var cards = GetSelectedAbCards();
// display the selected card, if exactly one card is selected.
// either no cards, or more than one card is selected, clear the pane.
OnClickedCard(card)
if (cards.length == 1)
OnClickedCard(cards[0])
else
ClearCardViewPane();
}
// if card is null, OnClickedCard() must clear the card pane
function OnClickedCard(card)
{
if (card)
{
if (card)
DisplayCardViewPane(card);
else
ClearCardViewPane();

Просмотреть файл

@ -839,6 +839,7 @@ nsresult nsAbView::AddCard(AbCard *abcard, PRBool selectCardAfterAdding, PRInt32
rv = mCards.InsertElementAt((void *)abcard, *index);
NS_ENSURE_SUCCESS(rv,rv);
// this needs to happen after we insert the card, as RowCountChanged() will call GetRowCount()
if (mOutliner)
rv = mOutliner->RowCountChanged(*index, 1);
@ -911,6 +912,7 @@ nsresult nsAbView::RemoveCardAndSelectNextCard(nsISupports *item)
rv = RemoveCardAt(index);
NS_ENSURE_SUCCESS(rv,rv);
// this needs to happen after we remove the card, as RowCountChanged() will call GetRowCount()
if (mOutliner) {
rv = mOutliner->RowCountChanged(index, -1);
NS_ENSURE_SUCCESS(rv,rv);