summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorKent Quirk <q@lindenlab.com>2010-02-13 19:05:21 -0500
committerKent Quirk <q@lindenlab.com>2010-02-13 19:05:21 -0500
commit0b579ba112e5e4fa5b5348f1c865a3083b5e1175 (patch)
tree599c506927d50f9a4a51c2f776e8fe954505e4d0 /indra/llui
parent96f29d2ba0b66754b3b7b9e0f75deb198a84cb5f (diff)
parent9fee359d1baf6e0046655cb8e4afabb8774754b1 (diff)
Automated merge from viewer-2-0 to normalize beta 3
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lldockablefloater.cpp4
-rw-r--r--indra/llui/lldockablefloater.h2
-rw-r--r--indra/llui/llmultisliderctrl.cpp7
-rw-r--r--indra/llui/llpanel.cpp8
-rw-r--r--indra/llui/llsearcheditor.cpp7
-rw-r--r--indra/llui/lltabcontainer.cpp4
6 files changed, 23 insertions, 9 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 57baf28dab..a94f0206a6 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -223,10 +223,10 @@ void LLDockableFloater::draw()
LLFloater::draw();
}
-void LLDockableFloater::setDockControl(LLDockControl* dockControl)
+void LLDockableFloater::setDockControl(LLDockControl* dockControl, bool docked /* = true */)
{
mDockControl.reset(dockControl);
- setDocked(mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
+ setDocked(docked && mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
}
const LLUIImagePtr& LLDockableFloater::getDockTongue()
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 2b1ce99ae2..4d747390af 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -127,7 +127,7 @@ private:
void resetInstance();
protected:
- void setDockControl(LLDockControl* dockControl);
+ void setDockControl(LLDockControl* dockControl, bool docked = true);
const LLUIImagePtr& getDockTongue();
private:
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 50942e55ca..cc26c00a3e 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -330,13 +330,14 @@ void LLMultiSliderCtrl::updateText()
// static
void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata)
{
+ llassert(ctrl);
+ if (!ctrl)
+ return;
+
LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl->getParent());
llassert(self);
if (!self) // cast failed - wrong type! :O
return;
-
- if (!ctrl)
- return;
BOOL success = FALSE;
F32 val = self->mCurValue;
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 7b406e090a..d963cf4c98 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -397,6 +397,12 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_
if (!panelp)
{
panelp = LLUICtrlFactory::getInstance()->createFactoryPanel(name);
+ llassert(panelp);
+
+ if (!panelp)
+ {
+ return NULL; // :(
+ }
}
}
@@ -414,7 +420,7 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_
panelp->mCommitCallbackRegistrar.popScope();
panelp->mEnableCallbackRegistrar.popScope();
- if (panelp && !panelp->getFactoryMap().empty())
+ if (!panelp->getFactoryMap().empty())
{
LLUICtrlFactory::instance().popFactoryFunctions();
}
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 6fa99df82e..491eeeab54 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -60,6 +60,7 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
line_editor_params.keystroke_callback(boost::bind(&LLSearchEditor::handleKeystroke, this));
mSearchEditor = LLUICtrlFactory::create<LLLineEditor>(line_editor_params);
+ mSearchEditor->setPassDelete(TRUE);
addChild(mSearchEditor);
if (p.search_button_visible)
@@ -79,10 +80,12 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
if (p.clear_button_visible)
{
// Set up clear button.
- S32 clr_btn_width = getRect().getHeight(); // button is square, and as tall as search editor
- LLRect clear_btn_rect(getRect().getWidth() - clr_btn_width, getRect().getHeight(), getRect().getWidth(), 0);
LLButton::Params clr_btn_params(p.clear_button);
clr_btn_params.name(std::string("clear button"));
+ S32 clr_btn_top = clr_btn_params.rect.bottom + clr_btn_params.rect.height;
+ S32 clr_btn_right = getRect().getWidth() - clr_btn_params.pad_right;
+ S32 clr_btn_left = clr_btn_right - clr_btn_params.rect.width;
+ LLRect clear_btn_rect(clr_btn_left, clr_btn_top, clr_btn_right, p.clear_button.rect.bottom);
clr_btn_params.rect(clear_btn_rect) ;
clr_btn_params.follows.flags(FOLLOWS_RIGHT|FOLLOWS_TOP);
clr_btn_params.tab_stop(false);
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 13340e7ded..e810b6fe8f 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -891,6 +891,10 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon
void LLTabContainer::addTabPanel(const TabPanelParams& panel)
{
LLPanel* child = panel.panel();
+
+ llassert(child);
+ if (!child) return;
+
const std::string& label = panel.label.isProvided()
? panel.label()
: panel.panel()->getLabel();