From a1f21c968e3791bd8c613bc7b5073789b1bcc0d7 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 7 Jun 2010 16:49:06 -0700 Subject: EXT-7700 - Script error window shows [All Scripts] for every tab reviewed by Mani --- indra/llui/llfloater.cpp | 5 +++++ indra/llui/llmultifloater.cpp | 10 ++++++++++ indra/llui/llmultifloater.h | 1 + 3 files changed, 16 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index fad98e553f..341debc9a8 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -810,6 +810,11 @@ void LLFloater::applyTitle() { mDragHandle->setTitle ( mTitle ); } + + if (getHost()) + { + getHost()->updateFloaterTitle(this); + } } std::string LLFloater::getCurrentTitle() const diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index 3aea648562..b1dbce0000 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -238,6 +238,16 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, moveResizeHandlesToFront(); } +void LLMultiFloater::updateFloaterTitle(LLFloater* floaterp) +{ + S32 index = mTabContainer->getIndexForPanel(floaterp); + if (index != -1) + { + mTabContainer->setPanelTitle(index, floaterp->getShortTitle()); + } +} + + /** BOOL selectFloater(LLFloater* floaterp) diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index bbf2c56fe7..24a841f64e 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -80,6 +80,7 @@ public: void onTabSelected(); virtual void updateResizeLimits(); + virtual void updateFloaterTitle(LLFloater* floaterp); protected: struct LLFloaterData -- cgit v1.2.3 From 60a92dbaa49b07eca00ebb12edff02c14f1f5f96 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 9 Jun 2010 13:16:21 +0300 Subject: EXT-7328 FIX If accordion tab has "fit_to_panel" flag on its height shouldn't be changed while arranging accordion tabs even if its the only tab in ctrl. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/533/ --HG-- branch : product-engine --- indra/llui/llaccordionctrl.cpp | 4 +++- indra/llui/llaccordionctrltab.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 6bf1347514..cd23d5cd33 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -352,7 +352,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view) mAccordionTabs.push_back(accordion_tab); accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) ); - + arrange(); } void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) @@ -541,6 +541,8 @@ void LLAccordionCtrl::arrange() S32 panel_height = getRect().getHeight() - 2*BORDER_MARGIN; + if (accordion_tab->getFitParent()) + panel_height = accordion_tab->getRect().getHeight(); ctrlSetLeftTopAndSize(accordion_tab,panel_rect.mLeft,panel_top,panel_width,panel_height); show_hide_scrollbar(getRect().getWidth(),getRect().getHeight()); diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 82e0234bfc..480b26e130 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -190,6 +190,7 @@ public: void showAndFocusHeader(); void setFitPanel( bool fit ) { mFitPanel = true; } + bool getFitParent() const { return mFitPanel; } protected: void adjustContainerPanel (const LLRect& child_rect); -- cgit v1.2.3 From 015e0d55b3d3c54bc7323439399b2d73da6b205d Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 9 Jun 2010 14:07:34 -0700 Subject: Put range check around iterator assignment --- indra/llui/lllineeditor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 45f9de8e8d..c93ca1af88 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -377,7 +377,10 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) setCursor(llmin((S32)mText.length(), getCursor())); // Set current history line to end of history. - mCurrentHistoryLine = mLineHistory.end() - 1; + if(mLineHistory.end() != mLineHistory.begin()) + { + mCurrentHistoryLine = mLineHistory.end() - 1; + } mPrevText = mText; } -- cgit v1.2.3