small change to the way you get selection

git-svn-id: svn://10.0.0.236/trunk@67487 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com
2000-04-28 06:22:07 +00:00
parent 1cc1a29d13
commit e7664ef7d7
4 changed files with 13 additions and 9 deletions

View File

@@ -3352,11 +3352,12 @@ nsBrowserWindow::DoToggleSelection()
{
nsIPresShell* shell = GetPresShell();
if (nsnull != shell) {
nsCOMPtr<nsIDocument> doc;
shell->GetDocument(getter_AddRefs(doc));
if (doc) {
PRInt8 current = doc->GetDisplaySelection();
doc->SetDisplaySelection(!current);
nsCOMPtr<nsISelectionController> selCon;
selCon = do_QueryInterface(shell);
if (selCon) {
PRInt16 current;
selCon->GetDisplaySelection(&current);
selCon->SetDisplaySelection(!current);
ForceRefresh();
}
NS_RELEASE(shell);