From 41a30a59fb1b6dea2d531333d0429632f1fef2fe Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 2 Mar 2010 14:21:58 -0800 Subject: initial work changing topctrl to popup layer --- indra/newview/llexpandabletextbox.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'indra/newview/llexpandabletextbox.cpp') diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 3818ee6f78..9a906d8323 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -35,6 +35,7 @@ #include "llscrollcontainer.h" #include "llwindow.h" +#include "llviewerwindow.h" static LLDefaultChildRegistry::Register t1("expandable_text"); @@ -382,7 +383,7 @@ void LLExpandableTextBox::expandTextBox() setFocus(TRUE); // this lets us receive top_lost event(needed to collapse text box) // it also draws text box above all other ui elements - gFocusMgr.setTopCtrl(this); + gViewerWindow->addPopup(this); mExpanded = true; } @@ -401,10 +402,7 @@ void LLExpandableTextBox::collapseTextBox() updateTextBoxRect(); - if(gFocusMgr.getTopCtrl() == this) - { - gFocusMgr.setTopCtrl(NULL); - } + gViewerWindow->removePopup(this); } void LLExpandableTextBox::onFocusLost() @@ -414,13 +412,6 @@ void LLExpandableTextBox::onFocusLost() LLUICtrl::onFocusLost(); } -void LLExpandableTextBox::onTopLost() -{ - collapseTextBox(); - - LLUICtrl::onTopLost(); -} - void LLExpandableTextBox::setValue(const LLSD& value) { collapseTextBox(); -- cgit v1.2.3