summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-04-27 10:58:44 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-04-27 10:58:44 +0300
commitc1a56f9fb784b1f64ddae45c6dd5bb9f5ae6eecd (patch)
tree4b86afb813f9d5f85dfc10f74210b2ef44c291de /indra/newview
parent4a94133b072fc9263bf632f85468d2498a9c7eae (diff)
MAINT-1057 FIXED Cannot get focus for or close build floater using toolbar button when editing attachments in no-build area
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/commands.xml2
-rwxr-xr-xindra/newview/lltoolmgr.cpp9
-rwxr-xr-xindra/newview/lltoolmgr.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 2cd6638042..a0d3dc0f99 100755
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -37,7 +37,7 @@
tooltip_ref="Command_Build_Tooltip"
execute_function="Build.Toggle"
execute_parameters="build"
- is_enabled_function="Build.Enabled"
+ is_enabled_function="Build.EnabledOrActive"
is_enabled_parameters="build"
is_running_function="Floater.IsOpen"
is_running_parameters="build"
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 2f8e464b71..b0e3b5bf89 100755
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -83,6 +83,7 @@ LLToolMgr::LLToolMgr()
// Not a panel, register these callbacks globally.
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
+ LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.EnabledOrActive", boost::bind(&LLToolMgr::buildEnabledOrActive, this));
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Marketplace.Enabled", boost::bind(&LLToolMgr::canAccessMarketplace, this));
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Marketplace.Toggle", boost::bind(&LLToolMgr::toggleMarketplace, this, _2));
@@ -264,17 +265,21 @@ bool LLToolMgr::canEdit()
return LLViewerParcelMgr::getInstance()->allowAgentBuild();
}
+bool LLToolMgr::buildEnabledOrActive()
+{
+ return inEdit() || canEdit();
+}
+
void LLToolMgr::toggleBuildMode(const LLSD& sdname)
{
const std::string& param = sdname.asString();
+ LLFloaterReg::toggleInstanceOrBringToFront("build");
if (param == "build" && !canEdit())
{
return;
}
- LLFloaterReg::toggleInstanceOrBringToFront("build");
-
bool build_visible = LLFloaterReg::instanceVisible("build");
if (build_visible)
{
diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h
index a3c1045aac..e5b45750d9 100755
--- a/indra/newview/lltoolmgr.h
+++ b/indra/newview/lltoolmgr.h
@@ -54,6 +54,7 @@ public:
bool inEdit();
bool canEdit();
+ bool buildEnabledOrActive();
bool canAccessMarketplace();
void toggleBuildMode(const LLSD& sdname);
void toggleMarketplace(const LLSD& sdname);