summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-10-06 19:45:26 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-10-07 11:14:14 +0300
commit31c7b08c864b18b576754c7f1c315e0b6f47b8d9 (patch)
tree7e3aa08e11b40d88599a5309f21a3a9d12b43b71
parent5172f5d6d6ee76ffe9f7fe0a8a6eb8a86ec93d4d (diff)
SL-14030 FIXED Clicking in Places > My Landmarks scrolls the Places window.
-rw-r--r--indra/llui/llaccordionctrl.cpp3
-rw-r--r--indra/llui/llaccordionctrl.h4
-rw-r--r--indra/newview/llpanellandmarks.cpp6
3 files changed, 12 insertions, 1 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 61a119800e..809d72208f 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -55,6 +55,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
, mTabComparator( NULL )
, mNoVisibleTabsHelpText(NULL)
, mNoVisibleTabsOrigString(params.no_visible_tabs_text.initial_value().asString())
+ , mSkipScrollToChild(false)
{
initNoTabsWidget(params.no_matched_tabs_text);
@@ -659,7 +660,7 @@ void LLAccordionCtrl::onScrollPosChangeCallback(S32, LLScrollbar*)
// virtual
void LLAccordionCtrl::onUpdateScrollToChild(const LLUICtrl *cntrl)
{
- if (mScrollbar && mScrollbar->getVisible())
+ if (mScrollbar && mScrollbar->getVisible() && !mSkipScrollToChild)
{
// same as scrollToShowRect
LLRect rect;
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index b38a76d27f..2828254472 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -138,6 +138,8 @@ public:
bool getFitParent() const {return mFitParent;}
+ void setSkipScrollToChild(bool skip) { mSkipScrollToChild = skip; }
+
private:
void initNoTabsWidget(const LLTextBox::Params& tb_params);
void updateNoTabsHelpTextVisibility();
@@ -183,6 +185,8 @@ private:
F32 mAutoScrollRate;
LLTextBox* mNoVisibleTabsHelpText;
+ bool mSkipScrollToChild;
+
std::string mNoMatchedTabsOrigString;
std::string mNoVisibleTabsOrigString;
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index cd1dc0f070..ccd8497484 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -227,6 +227,12 @@ BOOL LLLandmarksPanel::postBuild()
initMyInventoryPanel();
initLibraryInventoryPanel();
+ LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("landmarks_accordion");
+ if (accordion)
+ {
+ accordion->setSkipScrollToChild(true);
+ }
+
return TRUE;
}