From 18566c502398e0e449717a06b1ffae3966e55522 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 31 Aug 2020 21:27:37 +0300 Subject: SL-13852 Add visibility options to inventory search results --- indra/llui/lllineeditor.h | 3 +++ indra/llui/llsearcheditor.cpp | 22 +++++++++++++++++++++- indra/llui/llsearcheditor.h | 20 ++++++++++++++++++-- 3 files changed, 42 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index aa5779d45f..f84625bea7 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -283,6 +283,9 @@ public: void resetContextMenu() { setContextMenu(NULL); }; + void setBgImage(LLPointer image) { mBgImage = image; } + void setBgImageFocused(LLPointer image) { mBgImageFocused = image; } + private: // private helper methods diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 1fdd05a11c..bafeef41fb 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -34,7 +34,11 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) : LLUICtrl(p), mSearchButton(NULL), - mClearButton(NULL) + mClearButton(NULL), + mEditorImage(p.background_image), + mEditorImageFocused(p.background_image_focused), + mEditorSearchImage(p.background_image_highlight), + mHighlightTextField(p.highlight_text_field) { S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height; S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad; @@ -57,6 +61,8 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) // Set up line editor. LLLineEditor::Params line_editor_params(p); line_editor_params.name("filter edit box"); + line_editor_params.background_image(p.background_image); + line_editor_params.background_image_focused(p.background_image_focused); line_editor_params.rect(getLocalRect()); line_editor_params.follows.flags(FOLLOWS_ALL); line_editor_params.text_pad_left(text_pad_left); @@ -104,6 +110,20 @@ void LLSearchEditor::draw() if (mClearButton) mClearButton->setVisible(!mSearchEditor->getWText().empty()); + if (mHighlightTextField) + { + if (!mSearchEditor->getWText().empty()) + { + mSearchEditor->setBgImage(mEditorSearchImage); + mSearchEditor->setBgImageFocused(mEditorSearchImage); + } + else + { + mSearchEditor->setBgImage(mEditorImage); + mSearchEditor->setBgImageFocused(mEditorImageFocused); + } + } + LLUICtrl::draw(); } diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index 3b12868225..c0f3c1d60c 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -47,14 +47,23 @@ public: Optional search_button, clear_button; Optional search_button_visible, - clear_button_visible; + clear_button_visible, + highlight_text_field; Optional keystroke_callback; + Optional background_image, + background_image_focused, + background_image_highlight; + Params() : search_button("search_button"), search_button_visible("search_button_visible"), clear_button("clear_button"), - clear_button_visible("clear_button_visible") + clear_button_visible("clear_button_visible"), + highlight_text_field("highlight_text_field"), + background_image("background_image"), + background_image_focused("background_image_focused"), + background_image_highlight("background_image_highlight") {} }; @@ -93,6 +102,13 @@ protected: LLLineEditor* mSearchEditor; LLButton* mSearchButton; LLButton* mClearButton; + + LLPointer mEditorImage; + LLPointer mEditorImageFocused; + LLPointer mEditorSearchImage; + LLPointer mEditorSearchImageFocused; + + bool mHighlightTextField; }; #endif // LL_SEARCHEDITOR_H -- cgit v1.2.3 From 177ad21ade8fbbb05ac5c373b8b43176e70e64a7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 17 Sep 2020 19:34:03 +0300 Subject: SL-13729 Performance of LLUI and LLRender2D --- indra/llui/llmultislider.cpp | 23 +++++++++++------------ indra/llui/llmultislider.h | 1 + indra/llui/llui.cpp | 12 ++++++++++++ indra/llui/llui.h | 16 ++++++++-------- 4 files changed, 32 insertions(+), 20 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index acfe4a0cba..f89064d59a 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -136,6 +136,7 @@ LLMultiSlider::LLMultiSlider(const LLMultiSlider::Params& p) } } + mRoundedSquareImgp = LLUI::getUIImage("Rounded_Square"); if (p.thumb_image.isProvided()) { mThumbImagep = LLUI::getUIImage(p.thumb_image()); @@ -666,8 +667,6 @@ void LLMultiSlider::draw() F32 opacity = getEnabled() ? 1.f : 0.3f; // Track - LLUIImagePtr thumb_imagep = LLUI::getUIImage("Rounded_Square"); - static LLUICachedControl multi_track_height_width ("UIMultiTrackHeight", 0); S32 height_offset = 0; S32 width_offset = 0; @@ -685,7 +684,7 @@ void LLMultiSlider::draw() if(mDrawTrack) { track_rect.stretch(-1); - thumb_imagep->draw(track_rect, mTrackColor.get() % opacity); + mRoundedSquareImgp->draw(track_rect, mTrackColor.get() % opacity); } // if we're supposed to use a drawn triangle @@ -704,7 +703,7 @@ void LLMultiSlider::draw() mTriangleColor.get() % opacity, TRUE); } } - else if (!thumb_imagep && !mThumbImagep) + else if (!mRoundedSquareImgp && !mThumbImagep) { // draw all the thumbs curSldrIt = mThumbRects.end(); @@ -757,7 +756,7 @@ void LLMultiSlider::draw() } else { - thumb_imagep->drawSolid(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f); + mRoundedSquareImgp->drawSolid(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f); } } @@ -772,7 +771,7 @@ void LLMultiSlider::draw() } else { - thumb_imagep->drawBorder(mThumbRects[mCurSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); + mRoundedSquareImgp->drawBorder(mThumbRects[mCurSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); } } } @@ -784,7 +783,7 @@ void LLMultiSlider::draw() } else { - thumb_imagep->drawBorder(mThumbRects[mHoverSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); + mRoundedSquareImgp->drawBorder(mThumbRects[mHoverSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); } } @@ -822,11 +821,11 @@ void LLMultiSlider::draw() } else if (capture == this) { - thumb_imagep->drawSolid(mIt->second, curThumbColor); + mRoundedSquareImgp->drawSolid(mIt->second, curThumbColor); } else { - thumb_imagep->drawSolid(mIt->second, curThumbColor % opacity); + mRoundedSquareImgp->drawSolid(mIt->second, curThumbColor % opacity); } } @@ -846,11 +845,11 @@ void LLMultiSlider::draw() } else if (capture == this) { - thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get()); + mRoundedSquareImgp->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get()); } else { - thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get() % opacity); + mRoundedSquareImgp->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get() % opacity); } } if(hoverSldrIt != mThumbRects.end()) @@ -861,7 +860,7 @@ void LLMultiSlider::draw() } else { - thumb_imagep->drawSolid(hoverSldrIt->second, mThumbCenterSelectedColor.get()); + mRoundedSquareImgp->drawSolid(hoverSldrIt->second, mThumbCenterSelectedColor.get()); } } } diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 99a78d6e09..3cb4b760b0 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -150,6 +150,7 @@ protected: LLUIColor mDisabledThumbColor; LLUIColor mTriangleColor; LLUIImagePtr mThumbImagep; //blimps on the slider, for now no 'disabled' support + LLUIImagePtr mRoundedSquareImgp; //blimps on the slider, for now no 'disabled' support const EOrientation mOrientation; diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 656b69d3ed..77b59e5bc5 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -510,6 +510,18 @@ const LLView* LLUI::resolvePath(const LLView* context, const std::string& path) return context; } +//static +LLVector2& LLUI::getScaleFactor() +{ + return LLRender::sUIGLScaleFactor; +} + +//static +void LLUI::setScaleFactor(const LLVector2& scale_factor) +{ + LLRender::sUIGLScaleFactor = scale_factor; +} + // LLLocalClipRect and LLScreenClipRect moved to lllocalcliprect.h/cpp diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 9856e551cc..238bef3bf8 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -313,14 +313,14 @@ public: void positionViewNearMouse(LLView* view, S32 spawn_x = S32_MAX, S32 spawn_y = S32_MAX); // LLRender2D wrappers - static void pushMatrix() { LLRender2D::getInstance()->pushMatrix(); } - static void popMatrix() { LLRender2D::getInstance()->popMatrix(); } - static void loadIdentity() { LLRender2D::getInstance()->loadIdentity(); } - static void translate(F32 x, F32 y, F32 z = 0.0f) { LLRender2D::getInstance()->translate(x, y, z); } - - static LLVector2& getScaleFactor() { return LLRender2D::getInstance()->mGLScaleFactor; } - static void setScaleFactor(const LLVector2& scale_factor) { LLRender2D::getInstance()->setScaleFactor(scale_factor); } - static void setLineWidth(F32 width) { LLRender2D::getInstance()->setLineWidth(width); } + static void pushMatrix() { LLRender2D::pushMatrix(); } + static void popMatrix() { LLRender2D::popMatrix(); } + static void loadIdentity() { LLRender2D::loadIdentity(); } + static void translate(F32 x, F32 y, F32 z = 0.0f) { LLRender2D::translate(x, y, z); } + + static LLVector2& getScaleFactor(); + static void setScaleFactor(const LLVector2& scale_factor); + static void setLineWidth(F32 width) { LLRender2D::setLineWidth(width); } static LLPointer getUIImageByID(const LLUUID& image_id, S32 priority = 0) { return LLRender2D::getInstance()->getUIImageByID(image_id, priority); } static LLPointer getUIImage(const std::string& name, S32 priority = 0) -- cgit v1.2.3 From a5c8b1cbe20c2ccd609f550ff4983741f622fc27 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 17 Sep 2020 20:34:58 +0300 Subject: SL-13729 Performance of LLUI and LLRender2D #2 --- indra/llui/llconsole.cpp | 4 +++- indra/llui/llfloater.cpp | 6 ++++-- indra/llui/llfolderview.cpp | 7 +++++-- indra/llui/llfolderviewmodel.cpp | 5 +++-- indra/llui/lltoolbar.cpp | 2 +- indra/llui/lltooltip.cpp | 4 ++-- indra/llui/llurlentry.cpp | 2 +- indra/llui/llview.cpp | 8 +++++--- 8 files changed, 24 insertions(+), 14 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 7817d99aef..de09fdbafd 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -180,7 +180,9 @@ void LLConsole::draw() LLUIImagePtr imagep = LLUI::getUIImage("transparent"); - F32 console_opacity = llclamp(LLUI::getInstance()->mSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); + static LLCachedControl console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f); + F32 console_opacity = llclamp((F32)console_bg_opacity, 0.f, 1.f); + LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); color.mV[VALPHA] *= console_opacity; diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index abb043f428..5ea4a36a6c 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -378,13 +378,15 @@ void LLFloater::layoutDragHandle() // static void LLFloater::updateActiveFloaterTransparency() { - sActiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("ActiveFloaterTransparency"); + static LLCachedControl active_transparency(*LLUI::getInstance()->mSettingGroups["config"], "ActiveFloaterTransparency", 1.f); + sActiveControlTransparency = active_transparency; } // static void LLFloater::updateInactiveFloaterTransparency() { - sInactiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("InactiveFloaterTransparency"); + static LLCachedControl inactive_transparency(*LLUI::getInstance()->mSettingGroups["config"], "InactiveFloaterTransparency", 0.95f); + sInactiveControlTransparency = inactive_transparency; } void LLFloater::addResizeCtrls() diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index e718fcec46..483862298c 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -342,7 +342,9 @@ static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View"); void LLFolderView::filter( LLFolderViewFilter& filter ) { LL_RECORD_BLOCK_TIME(FTM_FILTER); - filter.resetTime(llclamp(LLUI::getInstance()->mSettingGroups["config"]->getS32(mParentPanel.get()->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100)); + static LLCachedControl time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10); + static LLCachedControl time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1); + filter.resetTime(llclamp((S32)(mParentPanel.get()->getVisible() ? time_visible : time_invisible), 1, 100)); // Note: we filter the model, not the view getViewModelItem()->filter(filter); @@ -661,7 +663,8 @@ void LLFolderView::draw() closeAutoOpenedFolders(); } - if (mSearchTimer.getElapsedTimeF32() > LLUI::getInstance()->mSettingGroups["config"]->getF32("TypeAheadTimeout") || !mSearchString.size()) + static LLCachedControl type_ahead_timeout(*LLUI::getInstance()->mSettingGroups["config"], "TypeAheadTimeout", 1.5f); + if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout || !mSearchString.size()) { mSearchString.clear(); } diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index 3b45fb53a2..a91c3e07d4 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -48,8 +48,9 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { - getFilter().resetTime(llclamp(LLUI::getInstance()->mSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrameVisible"), 1, 100)); - mFolderView->getViewModelItem()->filter(getFilter()); + static LLCachedControl max_time(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10); + getFilter().resetTime(llclamp((S32)max_time, 1, 100)); + mFolderView->getViewModelItem()->filter(getFilter()); } bool LLFolderViewModelItemCommon::hasFilterStringMatch() diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index e6f466ec78..0961db37ba 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -1125,7 +1125,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask) BOOL handled = FALSE; S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY); - S32 drag_threshold = LLUI::getInstance()->mSettingGroups["config"]->getS32("DragAndDropDistanceThreshold"); + static LLCachedControl drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3); if (mouse_distance_squared > drag_threshold * drag_threshold && hasMouseCapture() && mStartDragItemCallback && mHandleDragItemCallback) diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 422534b781..1262e8a820 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -358,8 +358,8 @@ void LLToolTip::draw() if (mFadeTimer.getStarted()) { - F32 tool_tip_fade_time = LLUI::getInstance()->mSettingGroups["config"]->getF32("ToolTipFadeTime"); - alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time, 1.f, 0.f); + static LLCachedControl tool_tip_fade_time(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFadeTime", 0.2f); + alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, (F32)tool_tip_fade_time, 1.f, 0.f); if (alpha == 0.f) { // finished fading out, so hide ourselves diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 333d03f208..3609f3b238 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -176,7 +176,7 @@ void LLUrlEntryBase::callObservers(const std::string &id, bool LLUrlEntryBase::isLinkDisabled() const { // this allows us to have a global setting to turn off text hyperlink highlighting/action - bool globally_disabled = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("DisableTextHyperlinkActions"); + static LLCachedControl globally_disabled(*LLUI::getInstance()->mSettingGroups["config"], "DisableTextHyperlinkActions", false); return globally_disabled; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index bd213d594a..8b889376b8 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -875,14 +875,16 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) std::string tooltip = getToolTip(); if (!tooltip.empty()) { + static LLCachedControl tooltip_fast_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFastDelay", 0.1f); + static LLCachedControl tooltip_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipDelay", 0.7f); + static LLCachedControl allow_ui_tooltips(*LLUI::getInstance()->mSettingGroups["config"], "BasicUITooltips", true); // allow "scrubbing" over ui by showing next tooltip immediately // if previous one was still visible F32 timeout = LLToolTipMgr::instance().toolTipVisible() - ? LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipFastDelay" ) - : LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipDelay" ); + ? tooltip_fast_delay + : tooltip_delay; // Even if we don't show tooltips, consume the event, nothing below should show tooltip - bool allow_ui_tooltips = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("BasicUITooltips"); if (allow_ui_tooltips) { LLToolTipMgr::instance().show(LLToolTip::Params() -- cgit v1.2.3 From 0d7f6d917af2e0b19a32a925ded6fab4b1a6725e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 18 Sep 2020 16:57:57 +0300 Subject: SL-13729 Performance of LLUI and LLRender2D #3 --- indra/llui/llaccordionctrltab.cpp | 2 +- indra/llui/llconsole.cpp | 2 +- indra/llui/llfolderview.cpp | 2 +- indra/llui/llfolderviewmodel.cpp | 2 +- indra/llui/lltooltip.cpp | 2 +- indra/llui/llui.cpp | 14 -------------- indra/llui/llui.h | 4 ---- indra/llui/llview.cpp | 14 ++++++++++++-- indra/llui/llview.h | 3 +++ 9 files changed, 20 insertions(+), 25 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 1034a21905..16ca578111 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -977,7 +977,7 @@ void LLAccordionCtrlTab::drawChild(const LLRect& root_rect,LLView* child) LLRect screen_rect; localRectToScreen(child->getRect(),&screen_rect); - if ( root_rect.overlaps(screen_rect) && LLUI::getInstance()->mDirtyRect.overlaps(screen_rect)) + if ( root_rect.overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect)) { gGL.matrixMode(LLRender::MM_MODELVIEW); LLUI::pushMatrix(); diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index de09fdbafd..8fc2978bdd 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -181,7 +181,7 @@ void LLConsole::draw() LLUIImagePtr imagep = LLUI::getUIImage("transparent"); static LLCachedControl console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f); - F32 console_opacity = llclamp((F32)console_bg_opacity, 0.f, 1.f); + F32 console_opacity = llclamp(console_bg_opacity(), 0.f, 1.f); LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); color.mV[VALPHA] *= console_opacity; diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 483862298c..622c9edba7 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -344,7 +344,7 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) LL_RECORD_BLOCK_TIME(FTM_FILTER); static LLCachedControl time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10); static LLCachedControl time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1); - filter.resetTime(llclamp((S32)(mParentPanel.get()->getVisible() ? time_visible : time_invisible), 1, 100)); + filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? time_visible() : time_invisible()), 1, 100)); // Note: we filter the model, not the view getViewModelItem()->filter(filter); diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index a91c3e07d4..93122503d1 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -49,7 +49,7 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { static LLCachedControl max_time(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10); - getFilter().resetTime(llclamp((S32)max_time, 1, 100)); + getFilter().resetTime(llclamp(max_time(), 1, 100)); mFolderView->getViewModelItem()->filter(getFilter()); } diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 1262e8a820..2f56a8b1d0 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -359,7 +359,7 @@ void LLToolTip::draw() if (mFadeTimer.getStarted()) { static LLCachedControl tool_tip_fade_time(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFadeTime", 0.2f); - alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, (F32)tool_tip_fade_time, 1.f, 0.f); + alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time(), 1.f, 0.f); if (alpha == 0.f) { // finished fading out, so hide ourselves diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 77b59e5bc5..6f16745bd3 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -154,7 +154,6 @@ mAudioCallback(audio_callback), mDeferredAudioCallback(deferred_audio_callback), mWindow(NULL), // set later in startup mRootView(NULL), -mDirty(FALSE), mHelpImpl(NULL) { LLRender2D::initParamSingleton(image_provider); @@ -203,19 +202,6 @@ void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& rem mClearPopupsFunc = clear_popups; } -void LLUI::dirtyRect(LLRect rect) -{ - if (!mDirty) - { - mDirtyRect = rect; - mDirty = TRUE; - } - else - { - mDirtyRect.unionWith(rect); - } -} - void LLUI::setMousePositionScreen(S32 x, S32 y) { #if defined(LL_DARWIN) diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 238bef3bf8..30dbd7248f 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -245,10 +245,6 @@ public: void setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t&, const clear_popups_t& ); - LLRect mDirtyRect; - BOOL mDirty; - void dirtyRect(LLRect rect); - // Return the ISO639 language name ("en", "ko", etc.) for the viewer UI. // http://www.loc.gov/standards/iso639-2/php/code_list.php std::string getUILanguage(); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 8b889376b8..f8686018b8 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -60,6 +60,8 @@ static const S32 LINE_HEIGHT = 15; S32 LLView::sDepth = 0; bool LLView::sDebugRects = false; +bool LLView::sIsRectDirty = false; +LLRect LLView::sDirtyRect; bool LLView::sDebugRectsShowNames = true; bool LLView::sDebugKeys = false; bool LLView::sDebugMouseHandling = false; @@ -1181,7 +1183,7 @@ void LLView::drawChildren() if (viewp->getVisible() && viewp->getRect().isValid()) { LLRect screen_rect = viewp->calcScreenRect(); - if ( rootp->getLocalRect().overlaps(screen_rect) && LLUI::getInstance()->mDirtyRect.overlaps(screen_rect)) + if ( rootp->getLocalRect().overlaps(screen_rect) && sDirtyRect.overlaps(screen_rect)) { LLUI::pushMatrix(); { @@ -1223,7 +1225,15 @@ void LLView::dirtyRect() parent = parent->getParent(); } - LLUI::getInstance()->dirtyRect(cur->calcScreenRect()); + if (!sIsRectDirty) + { + sDirtyRect = cur->calcScreenRect(); + sIsRectDirty = true; + } + else + { + sDirtyRect.unionWith(cur->calcScreenRect()); + } } //Draw a box for debugging. diff --git a/indra/llui/llview.h b/indra/llui/llview.h index db81900aaf..7c90794ddb 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -656,6 +656,9 @@ public: // Draw debug rectangles around widgets to help with alignment and spacing static bool sDebugRects; + static bool sIsRectDirty; + static LLRect sDirtyRect; + // Draw widget names and sizes when drawing debug rectangles, turning this // off is useful to make the rectangles themselves easier to see. static bool sDebugRectsShowNames; -- cgit v1.2.3 From 10a2519e737d2fc4be74e7bb289d0b3eb0709aa0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 23 Sep 2020 12:30:59 +0300 Subject: Revert "SL-13852 Add visibility options to inventory search results" This reverts commit 18566c502398e0e449717a06b1ffae3966e55522. --- indra/llui/lllineeditor.h | 3 --- indra/llui/llsearcheditor.cpp | 22 +--------------------- indra/llui/llsearcheditor.h | 20 ++------------------ 3 files changed, 3 insertions(+), 42 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index f84625bea7..aa5779d45f 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -283,9 +283,6 @@ public: void resetContextMenu() { setContextMenu(NULL); }; - void setBgImage(LLPointer image) { mBgImage = image; } - void setBgImageFocused(LLPointer image) { mBgImageFocused = image; } - private: // private helper methods diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index bafeef41fb..1fdd05a11c 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -34,11 +34,7 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) : LLUICtrl(p), mSearchButton(NULL), - mClearButton(NULL), - mEditorImage(p.background_image), - mEditorImageFocused(p.background_image_focused), - mEditorSearchImage(p.background_image_highlight), - mHighlightTextField(p.highlight_text_field) + mClearButton(NULL) { S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height; S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad; @@ -61,8 +57,6 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) // Set up line editor. LLLineEditor::Params line_editor_params(p); line_editor_params.name("filter edit box"); - line_editor_params.background_image(p.background_image); - line_editor_params.background_image_focused(p.background_image_focused); line_editor_params.rect(getLocalRect()); line_editor_params.follows.flags(FOLLOWS_ALL); line_editor_params.text_pad_left(text_pad_left); @@ -110,20 +104,6 @@ void LLSearchEditor::draw() if (mClearButton) mClearButton->setVisible(!mSearchEditor->getWText().empty()); - if (mHighlightTextField) - { - if (!mSearchEditor->getWText().empty()) - { - mSearchEditor->setBgImage(mEditorSearchImage); - mSearchEditor->setBgImageFocused(mEditorSearchImage); - } - else - { - mSearchEditor->setBgImage(mEditorImage); - mSearchEditor->setBgImageFocused(mEditorImageFocused); - } - } - LLUICtrl::draw(); } diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index c0f3c1d60c..3b12868225 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -47,23 +47,14 @@ public: Optional search_button, clear_button; Optional search_button_visible, - clear_button_visible, - highlight_text_field; + clear_button_visible; Optional keystroke_callback; - Optional background_image, - background_image_focused, - background_image_highlight; - Params() : search_button("search_button"), search_button_visible("search_button_visible"), clear_button("clear_button"), - clear_button_visible("clear_button_visible"), - highlight_text_field("highlight_text_field"), - background_image("background_image"), - background_image_focused("background_image_focused"), - background_image_highlight("background_image_highlight") + clear_button_visible("clear_button_visible") {} }; @@ -102,13 +93,6 @@ protected: LLLineEditor* mSearchEditor; LLButton* mSearchButton; LLButton* mClearButton; - - LLPointer mEditorImage; - LLPointer mEditorImageFocused; - LLPointer mEditorSearchImage; - LLPointer mEditorSearchImageFocused; - - bool mHighlightTextField; }; #endif // LL_SEARCHEDITOR_H -- cgit v1.2.3 From 0b395f01f9cfc71bdc6692c4392ffe3da50963ee Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 30 Sep 2020 14:25:21 +0300 Subject: SL-13570 FIXED The name of the item is overlapped by search term in inventory --- indra/llui/llfolderviewitem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 9a1f7de73b..177684c5e3 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -914,9 +914,10 @@ void LLFolderViewItem::draw() // if (filter_string_length > 0) { - F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mViewModelItem->getFilterStringOffset()); + S32 filter_offset = mViewModelItem->getFilterStringOffset(); + F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string, filter_offset, filter_string_length); F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD; - font->renderUTF8( combined_string, mViewModelItem->getFilterStringOffset(), match_string_left, yy, + font->renderUTF8( combined_string, filter_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, filter_string_length, S32_MAX, &right_x, FALSE ); } -- cgit v1.2.3 From 071e0ff36b510f66100ca338c8ef923858d8c451 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 4 Jan 2021 17:29:50 +0200 Subject: SL-14494 FIXED llRequestURL() generated URLs are no longer recognized by the viewer as Second Life hosted URLs --- indra/llui/llurlentry.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 5be15eac13..55b33396f7 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -464,7 +464,9 @@ LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL() "|" "(https://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(:\\d{1,5})?)" "|" - "(https://([-\\w\\.]*\\.)?secondlifegrid\\.net(:\\d{1,5})?))" + "(https://([-\\w\\.]*\\.)?secondlifegrid\\.net(:\\d{1,5})?)" + "|" + "(https?://([-\\w\\.]*\\.)?secondlife\\.io(:\\d{1,5})?))" "\\/\\S*", boost::regex::perl|boost::regex::icase); -- cgit v1.2.3 From a66932a091bac4d4ca1a861901b9cef619a406f7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 19 Mar 2021 12:55:04 +0200 Subject: SL-14927 Some avatar names not resolving in chat buildConversationViewParticipant() was deparenting view models that belong to session --- indra/llui/llfolderviewitem.cpp | 10 ++++++++-- indra/llui/llfolderviewitem.h | 2 +- indra/llui/llfolderviewmodel.h | 6 ++++-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 9f6ceac768..31202f02bf 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1608,7 +1608,7 @@ void LLFolderViewFolder::destroyView() // extractItem() removes the specified item from the folder, but // doesn't delete it. -void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) +void LLFolderViewFolder::extractItem( LLFolderViewItem* item) { if (item->isSelected()) getRoot()->clearSelection(); @@ -1631,7 +1631,13 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) mItems.erase(it); } //item has been removed, need to update filter - getViewModelItem()->removeChild(item->getViewModelItem()); + LLFolderViewModelItem* parent_model = getViewModelItem(); + LLFolderViewModelItem* child_model = item->getViewModelItem(); + if (child_model->getParent() == parent_model) + { + // in some cases model does not belong to parent view, is shared between views + parent_model->removeChild(child_model); + } //because an item is going away regardless of filter status, force rearrange requestArrange(); removeChild(item); diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index da09d139e9..3bfc7ee8cf 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -387,7 +387,7 @@ public: // extractItem() removes the specified item from the folder, but // doesn't delete it. - virtual void extractItem( LLFolderViewItem* item ); + virtual void extractItem( LLFolderViewItem* item); // This function is called by a child that needs to be resorted. void resort(LLFolderViewItem* item); diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index f4ddfa8f18..8684c71672 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -218,7 +218,8 @@ public: virtual S32 getSortVersion() = 0; virtual void setSortVersion(S32 version) = 0; virtual void setParent(LLFolderViewModelItem* parent) = 0; - virtual bool hasParent() = 0; + virtual LLFolderViewModelItem* getParent() const = 0; + virtual bool hasParent() const = 0; protected: @@ -358,7 +359,8 @@ public: protected: virtual void setParent(LLFolderViewModelItem* parent) { mParent = parent; } - virtual bool hasParent() { return mParent != NULL; } + virtual LLFolderViewModelItem* getParent() const { return mParent; } + virtual bool hasParent() const { return mParent != NULL; } S32 mSortVersion; bool mPassedFilter; -- cgit v1.2.3 From 5f6a025397d0bcca27adc01fcb6fc324b7bdbd4d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 19 Mar 2021 13:40:19 +0200 Subject: Revert "SL-14927 Some avatar names not resolving in chat" This reverts commit a66932a091bac4d4ca1a861901b9cef619a406f7. --- indra/llui/llfolderviewitem.cpp | 10 ++-------- indra/llui/llfolderviewitem.h | 2 +- indra/llui/llfolderviewmodel.h | 6 ++---- 3 files changed, 5 insertions(+), 13 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 31202f02bf..9f6ceac768 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1608,7 +1608,7 @@ void LLFolderViewFolder::destroyView() // extractItem() removes the specified item from the folder, but // doesn't delete it. -void LLFolderViewFolder::extractItem( LLFolderViewItem* item) +void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) { if (item->isSelected()) getRoot()->clearSelection(); @@ -1631,13 +1631,7 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item) mItems.erase(it); } //item has been removed, need to update filter - LLFolderViewModelItem* parent_model = getViewModelItem(); - LLFolderViewModelItem* child_model = item->getViewModelItem(); - if (child_model->getParent() == parent_model) - { - // in some cases model does not belong to parent view, is shared between views - parent_model->removeChild(child_model); - } + getViewModelItem()->removeChild(item->getViewModelItem()); //because an item is going away regardless of filter status, force rearrange requestArrange(); removeChild(item); diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 3bfc7ee8cf..da09d139e9 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -387,7 +387,7 @@ public: // extractItem() removes the specified item from the folder, but // doesn't delete it. - virtual void extractItem( LLFolderViewItem* item); + virtual void extractItem( LLFolderViewItem* item ); // This function is called by a child that needs to be resorted. void resort(LLFolderViewItem* item); diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 8684c71672..f4ddfa8f18 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -218,8 +218,7 @@ public: virtual S32 getSortVersion() = 0; virtual void setSortVersion(S32 version) = 0; virtual void setParent(LLFolderViewModelItem* parent) = 0; - virtual LLFolderViewModelItem* getParent() const = 0; - virtual bool hasParent() const = 0; + virtual bool hasParent() = 0; protected: @@ -359,8 +358,7 @@ public: protected: virtual void setParent(LLFolderViewModelItem* parent) { mParent = parent; } - virtual LLFolderViewModelItem* getParent() const { return mParent; } - virtual bool hasParent() const { return mParent != NULL; } + virtual bool hasParent() { return mParent != NULL; } S32 mSortVersion; bool mPassedFilter; -- cgit v1.2.3 From 65352e988410d8001d485fa9d72858e21cc80df7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 19 Mar 2021 13:47:32 +0200 Subject: SL-14927 Some avatar names not resolving in chat --- indra/llui/llfolderviewitem.cpp | 8 ++++++-- indra/llui/llfolderviewitem.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 9f6ceac768..285bf9f484 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1608,7 +1608,7 @@ void LLFolderViewFolder::destroyView() // extractItem() removes the specified item from the folder, but // doesn't delete it. -void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) +void LLFolderViewFolder::extractItem( LLFolderViewItem* item, bool deparent_model ) { if (item->isSelected()) getRoot()->clearSelection(); @@ -1631,7 +1631,11 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) mItems.erase(it); } //item has been removed, need to update filter - getViewModelItem()->removeChild(item->getViewModelItem()); + if (deparent_model) + { + // in some cases model does not belong to parent view, is shared between views + getViewModelItem()->removeChild(item->getViewModelItem()); + } //because an item is going away regardless of filter status, force rearrange requestArrange(); removeChild(item); diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index da09d139e9..616d2e7d86 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -387,7 +387,7 @@ public: // extractItem() removes the specified item from the folder, but // doesn't delete it. - virtual void extractItem( LLFolderViewItem* item ); + virtual void extractItem( LLFolderViewItem* item, bool deparent_model = true); // This function is called by a child that needs to be resorted. void resort(LLFolderViewItem* item); -- cgit v1.2.3 From 1dfbce8169dbb9916723031e23a80548d9c496c3 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 8 Apr 2021 16:17:00 +0300 Subject: SL-15082 fix for app/region SLURLS --- indra/llui/llurlentry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 7250e6ca7e..06e7070f7e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1103,7 +1103,7 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const // LLUrlEntryRegion::LLUrlEntryRegion() { - mPattern = boost::regex("secondlife:///app/region/[^/\\s]+(/\\d+)?(/\\d+)?(/\\d+)?/?", + mPattern = boost::regex("secondlife:///app/region/[A-Za-z0-9]+(/\\d+)?(/\\d+)?(/\\d+)?/?", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_slurl.xml"; mTooltip = LLTrans::getString("TooltipSLURL"); -- cgit v1.2.3 From 94ce45441d3e00a8ff2dac6c41be23fa04cee31b Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Sat, 10 Apr 2021 01:38:17 +0300 Subject: SL-15082 regexp fix --- indra/llui/llurlentry.cpp | 2 +- indra/llui/tests/llurlentry_test.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 06e7070f7e..6ff1b0764e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1103,7 +1103,7 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const // LLUrlEntryRegion::LLUrlEntryRegion() { - mPattern = boost::regex("secondlife:///app/region/[A-Za-z0-9]+(/\\d+)?(/\\d+)?(/\\d+)?/?", + mPattern = boost::regex("secondlife:///app/region/[A-Za-z0-9()_%]+(/\\d+)?(/\\d+)?(/\\d+)?/?", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_slurl.xml"; mTooltip = LLTrans::getString("TooltipSLURL"); diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 4a4fdb72e3..1a474cca90 100644 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -739,11 +739,6 @@ namespace tut "XXX secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30 XXX", "secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30"); - // DEV-35459: SLURLs and teleport Links not parsed properly - testRegex("Region with quote", url, - "XXX secondlife:///app/region/A'ksha%20Oasis/41/166/701 XXX", - "secondlife:///app/region/A%27ksha%20Oasis/41/166/701"); - // Rendering tests. testLabel("Render /app/region/Ahern/50/50/50/", url, "secondlife:///app/region/Ahern/50/50/50/", -- cgit v1.2.3 From 33b30fd7e0e5bc2c8e0e737402c3e19675a53c3f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 14 Apr 2021 22:01:23 +0300 Subject: SL-15077 Mac Crash destroying LLNotificationSet Not a fix. Mac sometimes crashes when destroying mItems in LLPersistentNotificationChannel Decided to try cleaning mItems explicitly to see if it will change callstack, it won't fix the crash, but will help figuring out if source of the issue is in mItems or is LLPersistentNotificationChannel itself --- indra/llui/llnotificationptr.h | 3 +-- indra/llui/llnotifications.h | 15 +++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotificationptr.h b/indra/llui/llnotificationptr.h index acc047527f..580f353c7d 100644 --- a/indra/llui/llnotificationptr.h +++ b/indra/llui/llnotificationptr.h @@ -27,9 +27,8 @@ // Many classes just store a single LLNotificationPtr // and llnotifications.h is very large, so define this ligher header. -#include class LLNotification; -typedef boost::shared_ptr LLNotificationPtr; +typedef std::shared_ptr LLNotificationPtr; #endif diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 2f4578da17..39576ad86d 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -85,7 +85,6 @@ #include #include -#include #include #include #include @@ -304,7 +303,7 @@ typedef boost::shared_ptr LLNotificationVisibility */ class LLNotification : boost::noncopyable, - public boost::enable_shared_from_this + public std::enable_shared_from_this { LOG_CLASS(LLNotification); friend class LLNotifications; @@ -743,7 +742,10 @@ public: : mFilter(filter), mItems() {} - virtual ~LLNotificationChannelBase() {} + virtual ~LLNotificationChannelBase() + { + mItems.clear(); + } // you can also connect to a Channel, so you can be notified of // changes to this channel LLBoundListener connectChanged(const LLEventListener& slot) @@ -873,6 +875,7 @@ class LLNotifications : { LLSINGLETON(LLNotifications); LOG_CLASS(LLNotifications); + virtual ~LLNotifications() {} public: @@ -1070,7 +1073,11 @@ public: LLPersistentNotificationChannel() : LLNotificationChannel("Persistent", "Visible", ¬ificationFilter) {} - virtual ~LLPersistentNotificationChannel() {} + + virtual ~LLPersistentNotificationChannel() + { + mHistory.clear(); + } typedef std::vector history_list_t; history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); } -- cgit v1.2.3 From d91f3ab6ae8e94a96c1173efad50015b721bee73 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 24 Apr 2021 01:00:21 +0300 Subject: SL-15150 Crash at LLScrollColumnHeader::updateResizeBars Looks like mHeader is invalid yet mHeader->updateResizeBars() gets called, decided to validate column pointer --- indra/llui/llscrolllistcolumn.cpp | 4 ++-- indra/llui/llscrolllistctrl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index cc9ff7a487..82b0415624 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -257,7 +257,7 @@ void LLScrollColumnHeader::updateResizeBars() for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++) { LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col); - if (columnp->mHeader && columnp->mHeader->canResize()) + if (columnp && columnp->mHeader && columnp->mHeader->canResize()) { num_resizable_columns++; } @@ -269,7 +269,7 @@ void LLScrollColumnHeader::updateResizeBars() for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++) { LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col); - if (!columnp->mHeader) continue; + if (!columnp || !columnp->mHeader) continue; BOOL enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize(); columnp->mHeader->enableResizeBar(enable); if (enable) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index be85f1cb6a..de644185fd 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -743,12 +743,12 @@ void LLScrollListCtrl::updateColumns(bool force_update) LLScrollColumnHeader* last_header = NULL; for (column_ordered_it = mColumnsIndexed.begin(); column_ordered_it != mColumnsIndexed.end(); ++column_ordered_it) { - if ((*column_ordered_it)->getWidth() < 0) + LLScrollListColumn* column = *column_ordered_it; + if (!column || column->getWidth() < 0) { // skip hidden columns continue; } - LLScrollListColumn* column = *column_ordered_it; if (column->mHeader) { -- cgit v1.2.3