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:
@@ -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(¤t);
|
||||
selCon->SetDisplaySelection(!current);
|
||||
ForceRefresh();
|
||||
}
|
||||
NS_RELEASE(shell);
|
||||
|
||||
Reference in New Issue
Block a user