Skip to content
Snippets Groups Projects
Commit 75ebd835 authored by andreykproductengine's avatar andreykproductengine
Browse files

MAINT-6448 PERMISSION_DEBIT notification should default to Deny

parent 85d92553
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,19 @@ BOOL LLToastScriptQuestion::postBuild() ...@@ -54,6 +54,19 @@ BOOL LLToastScriptQuestion::postBuild()
return TRUE; return TRUE;
} }
// virtual
void LLToastScriptQuestion::setFocus(BOOL b)
{
LLToastPanel::setFocus(b);
// toast can fade out and disappear with focus ON, so reset to default anyway
LLButton* dfbutton = getDefaultButton();
if (dfbutton && dfbutton->getVisible() && dfbutton->getEnabled())
{
dfbutton->setFocus(b);
}
}
void LLToastScriptQuestion::snapToMessageHeight() void LLToastScriptQuestion::snapToMessageHeight()
{ {
LLTextBox* mMessage = getChild<LLTextBox>("top_info_message"); LLTextBox* mMessage = getChild<LLTextBox>("top_info_message");
...@@ -118,6 +131,12 @@ void LLToastScriptQuestion::createButtons() ...@@ -118,6 +131,12 @@ void LLToastScriptQuestion::createButtons()
button->setRect(rect); button->setRect(rect);
buttons_width += rect.getWidth() + LEFT_PAD; buttons_width += rect.getWidth() + LEFT_PAD;
if (form_element.has("default") && form_element["default"].asBoolean())
{
button->setFocus(TRUE);
setDefaultBtn(button);
}
} }
} }
} }
......
...@@ -39,6 +39,8 @@ class LLToastScriptQuestion : public LLToastPanel ...@@ -39,6 +39,8 @@ class LLToastScriptQuestion : public LLToastPanel
virtual BOOL postBuild(); virtual BOOL postBuild();
virtual ~LLToastScriptQuestion(){}; virtual ~LLToastScriptQuestion(){};
/*virtual*/ void setFocus(BOOL b);
private: private:
void snapToMessageHeight(); void snapToMessageHeight();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment