Update simple codeless floater behavior

Such that floater's named according to their filename will now close if they were frontmost
making their menu entries and buttons, toggly.

This effects the behavior of the toolbar preferences floater, the Favorites floater, and the My Outfits floater.
(and any such simple extensions made by forks and those that will come in the future)
This commit is contained in:
Inusaito Sayori
2014-08-04 23:36:47 -04:00
parent c6a7dc8f9c
commit fd562061ee

View File

@@ -279,7 +279,7 @@ void show_floater(const std::string& floater_name)
if (it == MenuFloaterDict::instance().mEntries.end()) // Simple codeless floater
{
if (LLFloater* floater = LLUICtrlFactory::getInstance()->getBuiltFloater(floater_name))
gFloaterView->bringToFront(floater);
floater->isFrontmost() ? floater->close() : gFloaterView->bringToFront(floater);
else
LLUICtrlFactory::getInstance()->buildFloater(new LLFloater(), floater_name);
}