summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index a5fd3ea552..40b550269c 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -113,7 +113,6 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
LLMultiFloater* LLFloater::sHostp = NULL;
BOOL LLFloater::sQuitting = FALSE; // Flag to prevent storing visibility controls while quitting
-LLFloater::handle_map_t LLFloater::sFloaterMap;
LLFloaterView* gFloaterView = NULL;
@@ -270,7 +269,6 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mMinimizeSignal(NULL)
// mNotificationContext(NULL)
{
- mHandle.bind(this);
// mNotificationContext = new LLFloaterNotificationContext(getHandle());
// Clicks stop here.
@@ -325,9 +323,6 @@ void LLFloater::initFloater(const Params& p)
// Floaters are created in the invisible state
setVisible(FALSE);
- // add self to handle->floater map
- sFloaterMap[mHandle] = this;
-
if (!getParent())
{
gFloaterView->addChild(this);
@@ -534,8 +529,6 @@ LLFloater::~LLFloater()
// correct, non-minimized positions.
setMinimized( FALSE );
- sFloaterMap.erase(mHandle);
-
delete mDragHandle;
for (S32 i = 0; i < 4; i++)
{
@@ -1040,7 +1033,9 @@ BOOL LLFloater::canSnapTo(const LLView* other_view)
if (other_view != getParent())
{
const LLFloater* other_floaterp = dynamic_cast<const LLFloater*>(other_view);
- if (other_floaterp && other_floaterp->getSnapTarget() == getHandle() && mDependents.find(other_floaterp->getHandle()) != mDependents.end())
+ if (other_floaterp
+ && other_floaterp->getSnapTarget() == getHandle()
+ && mDependents.find(other_floaterp->getHandle()) != mDependents.end())
{
// this is a dependent that is already snapped to us, so don't snap back to it
return FALSE;
@@ -1679,18 +1674,17 @@ void LLFloater::onClickHelp( LLFloater* self )
LLFloater* LLFloater::getClosableFloaterFromFocus()
{
LLFloater* focused_floater = NULL;
-
- handle_map_iter_t iter;
- for(iter = sFloaterMap.begin(); iter != sFloaterMap.end(); ++iter)
+ LLInstanceTracker<LLFloater>::instance_iter it = beginInstances();
+ LLInstanceTracker<LLFloater>::instance_iter end_it = endInstances();
+ for (; it != end_it; ++it)
{
- focused_floater = iter->second;
- if (focused_floater->hasFocus())
+ if (it->hasFocus())
{
break;
}
}
- if (iter == sFloaterMap.end())
+ if (it == endInstances())
{
// nothing found, return
return NULL;