Fix for Issue 1472, prevent what was probably a null pointer in a bind

Oddly, this only happened to some people, but on any OS, which leads me to believe that initialization order may need some looking at, but that's not terribly important now.

Removes toolbar toggle from floater dictionary, in favor of using setting toggle
Since we could always just hook up a control to a button if we wanted to add such a button somewhere anyhow, this has no effect on future either.
This commit is contained in:
Lirusaito
2014-04-26 10:17:47 -04:00
parent 2fc783e67e
commit 40f9e12bdf
2 changed files with 2 additions and 4 deletions

View File

@@ -102,7 +102,6 @@
#include "llmakeoutfitdialog.h"
#include "llmoveview.h" // LLFloaterMove
#include "lltextureview.h"
#include "lltoolbar.h"
#include "lltoolgrab.h"
#include "lltoolmgr.h"
#include "lluictrlfactory.h"
@@ -211,7 +210,6 @@ struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
registerFloater("sound_explorer", boost::bind(LLFloaterExploreSounds::toggle), boost::bind(LLFloaterExploreSounds::visible));
registerFloater("test", boost::bind(LLFloaterTest::show, (void*)NULL));
// Phoenix: Wolfspirit: Enabled Show Floater out of viewer menu
registerFloater("toolbar", boost::bind(toggle_control, "ShowToolBar"), boost::bind(&LLToolBar::getVisible, gToolBar));
registerFloater("WaterSettings", boost::bind(LLFloaterWater::show), boost::bind(LLFloaterWater::isOpen));
registerFloater("web", boost::bind(LLFloaterWebContent::showInstance, "dict web", LLFloaterWebContent::Params()));
registerFloater("Windlight", boost::bind(LLFloaterWindLight::show), boost::bind(LLFloaterWindLight::isOpen));

View File

@@ -321,8 +321,8 @@
mouse_opaque="true" name="separator" width="211" />
<menu_item_check bottom="-113" enabled="true" height="19" label="Toolbar" left="0"
mouse_opaque="true" name="Toolbar" width="211">
<on_click function="ShowFloater" userdata="toolbar" />
<on_check function="FloaterVisible" userdata="toolbar" />
<on_click function="ToggleControl" userdata="ShowToolBar"/>
<on_check control="ShowToolBar"/>
</menu_item_check>
<menu_item_call label="Change toolbar buttons" name="toolbar_prefs">
<on_click function="ShowFloater" userdata="floater_toolbar_prefs.xml"/>