From 63cc379c72e3f30a6e45c4b81c5a2e7078be0f1e Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Fri, 4 Oct 2013 02:50:50 +0300 Subject: MAINT-3270 FIXED crash in LLControlCache::LLControlCache: Control named RenderAutoMuteFunctionsnot found --- indra/llui/llfolderviewitem.cpp | 2 +- indra/llui/llui.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 6c147ccc12..1750ca0ed4 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -521,7 +521,7 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) { - static LLCachedControl drag_and_drop_threshold(*LLUI::sSettingGroups["config"],"DragAndDropDistanceThreshold"); + static LLCachedControl drag_and_drop_threshold(*LLUI::sSettingGroups["config"],"DragAndDropDistanceThreshold", 3); mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 0a0e0e164e..0bc4424a8c 100755 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -405,11 +405,6 @@ public: const std::string& comment = "Declared In Code") : LLCachedControl(LLUI::getControlControlGroup(name), name, default_value, comment) {} - - // This constructor will signal an error if the control doesn't exist in the control group - LLUICachedControl(const std::string& name) - : LLCachedControl(LLUI::getControlControlGroup(name), name) - {} }; namespace LLInitParam -- cgit v1.2.3 From f8e5ae8006b144b111f474640beb96ae135ae8ed Mon Sep 17 00:00:00 2001 From: dmitrykproductengine Date: Fri, 4 Oct 2013 14:04:31 +0300 Subject: MAINT-3142 FIXED Hover over highlighting broken in Second Life 3.6.6 (280797) --- indra/llui/llcommandmanager.cpp | 6 ++++-- indra/llui/llcommandmanager.h | 9 ++++++--- indra/llui/lltoolbar.cpp | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index ab37ee48b6..49cfb2255e 100755 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -50,7 +50,8 @@ const LLCommandId LLCommandId::null = LLCommandId("null command"); LLCommand::Params::Params() : available_in_toybox("available_in_toybox", false) , icon("icon") - , hover_icon("hover_icon") + , hover_icon_unselected("hover_icon_unselected") + , hover_icon_selected("hover_icon_selected") , label_ref("label_ref") , name("name") , tooltip_ref("tooltip_ref") @@ -72,7 +73,8 @@ LLCommand::LLCommand(const LLCommand::Params& p) : mIdentifier(p.name) , mAvailableInToybox(p.available_in_toybox) , mIcon(p.icon) - , mHoverIcon(p.hover_icon) + , mHoverIconUnselected(p.hover_icon_unselected) + , mHoverIconSelected(p.hover_icon_selected) , mLabelRef(p.label_ref) , mName(p.name) , mTooltipRef(p.tooltip_ref) diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h index 47a9b86785..9f276f712d 100755 --- a/indra/llui/llcommandmanager.h +++ b/indra/llui/llcommandmanager.h @@ -96,7 +96,8 @@ public: Mandatory name; Mandatory tooltip_ref; - Optional hover_icon; + Optional hover_icon_selected; + Optional hover_icon_unselected; Mandatory execute_function; Optional execute_parameters; @@ -126,7 +127,8 @@ public: const std::string& labelRef() const { return mLabelRef; } const std::string& name() const { return mName; } const std::string& tooltipRef() const { return mTooltipRef; } - const std::string& hoverIcon() const {return mHoverIcon; } + const std::string& hoverIconUnselected() const {return mHoverIconUnselected; } + const std::string& hoverIconSelected() const {return mHoverIconSelected; } const std::string& executeFunctionName() const { return mExecuteFunction; } const LLSD& executeParameters() const { return mExecuteParameters; } @@ -153,7 +155,8 @@ private: std::string mLabelRef; std::string mName; std::string mTooltipRef; - std::string mHoverIcon; + std::string mHoverIconUnselected; + std::string mHoverIconSelected; std::string mExecuteFunction; LLSD mExecuteParameters; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 75f52b8e34..6bfe113933 100755 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -928,7 +928,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) button_p.label = LLTrans::getString(commandp->labelRef()); button_p.tool_tip = LLTrans::getString(commandp->tooltipRef()); button_p.image_overlay = LLUI::getUIImage(commandp->icon()); - button_p.image_hover_unselected = LLUI::getUIImage(commandp->hoverIcon()); + button_p.image_hover_unselected = LLUI::getUIImage(commandp->hoverIconUnselected()); + button_p.image_hover_selected = LLUI::getUIImage(commandp->hoverIconSelected()); button_p.button_flash_enable = commandp->isFlashingAllowed(); button_p.overwriteFrom(mButtonParams[mButtonType]); LLToolBarButton* button = LLUICtrlFactory::create(button_p); -- cgit v1.2.3 From b7fbcef2983f9d15d6850b0141814f46a733ac2a Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Fri, 11 Oct 2013 23:06:25 +0300 Subject: MAINT-3289 (User is not able to open mini inspector by one click on 'i' icon) --- indra/llui/lltexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 7f309a5ff6..62140dd9d6 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -729,7 +729,7 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) // Delay cursor flashing resetCursorBlink(); - if (handled) + if (handled && !gFocusMgr.getMouseCapture()) { gFocusMgr.setMouseCapture( this ); } -- cgit v1.2.3 From 04b84ce07dd5bc8364f948ef0004e3dc5328f1b4 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 14 Oct 2013 14:21:06 +0300 Subject: MAINT-3290 FIXED Handle correctly Mouse Capture for LLTextBox. --- indra/llui/lltextbox.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 11cfa1d263..d175204e6d 100755 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -59,11 +59,14 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask) } if (!handled && mClickedCallback) + { + handled = TRUE; + } + + if (handled) { // Route future Mouse messages here preemptively. (Release on mouse up.) gFocusMgr.setMouseCapture( this ); - - handled = TRUE; } return handled; @@ -71,7 +74,7 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask) { - BOOL handled = FALSE; + BOOL handled = LLTextBase::handleMouseUp(x, y, mask); if (getSoundFlags() & MOUSE_UP) { @@ -93,10 +96,6 @@ BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask) handled = TRUE; } } - else - { - handled = LLTextBase::handleMouseUp(x, y, mask); - } return handled; } -- cgit v1.2.3 From e6b4b89bf12ae410fa87baf01117daa2a47754c0 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 11 Nov 2013 18:39:02 -0800 Subject: MAINT-3320 : WIP : Use handle for elements that'll get deleted under us, quite a bit of debug spam to clean later --- indra/llui/llfolderview.cpp | 11 +++++++++++ indra/llui/llfolderviewmodel.cpp | 8 ++++++++ 2 files changed, 19 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index cf449217f5..4d1c2a38d0 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -176,6 +176,7 @@ LLFolderView::LLFolderView(const Params& p) { mViewModel->setFolderView(this); mRoot = this; + llinfos << "Merov : create folder view, this = " << this << ", name = " << (std::string(p.name)) << ", model = " << getFolderViewModel() << llendl; LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); @@ -243,6 +244,7 @@ LLFolderView::LLFolderView(const Params& p) // Destroys the object LLFolderView::~LLFolderView( void ) { + llinfos << "Merov : delete folder view (start), this = " << this << ", model = " << getFolderViewModel() << llendl; closeRenamer(); // The release focus call can potentially call the @@ -264,7 +266,9 @@ LLFolderView::~LLFolderView( void ) mItems.clear(); mFolders.clear(); + mViewModel->setFolderView(NULL); mViewModel = NULL; + llinfos << "Merov : delete folder view (end), this = " << this << ", model = " << getFolderViewModel() << llendl; } BOOL LLFolderView::canFocusChildren() const @@ -1598,6 +1602,13 @@ void LLFolderView::update() // If this is associated with the user's inventory, don't do anything // until that inventory is loaded up. LLFastTimer t2(FTM_INVENTORY); + + // If there's no model, the view is in suspended state (being deleted) and shouldn't be updated + if (getFolderViewModel() == NULL) + { + return; + } + //llinfos << "Merov : update, this = " << this << ", model = " << getFolderViewModel() << llendl; if (getFolderViewModel()->getFilter().isModified() && getFolderViewModel()->getFilter().isNotDefault()) { diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index 3363dc5316..48ca8156f2 100755 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -36,6 +36,10 @@ bool LLFolderViewModelCommon::needsSort(LLFolderViewModelItem* item) std::string LLFolderViewModelCommon::getStatusText() { + if (!mFolderView) + { + llinfos << "Merov : Trying LLFolderViewModelCommon::getStatusText() on a NULL mFolderView!!!" << llendl; + } if (!contentsReady() || mFolderView->getViewModelItem()->getLastFilterGeneration() < getFilter().getCurrentGeneration()) { return LLTrans::getString("Searching"); @@ -48,6 +52,10 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { + if (!mFolderView) + { + llinfos << "Merov : Trying LLFolderViewModelCommon::filter() on a NULL mFolderView!!!" << llendl; + } getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrameVisible"), 1, 100)); mFolderView->getViewModelItem()->filter(getFilter()); } -- cgit v1.2.3 From 6ec99570cd86a89ed6367f81d6b0cccd7fe0e913 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 15 Nov 2013 15:12:11 -0800 Subject: MAINT-3320 : Fixed! Inventory panels are not resistant to folder root deletion, using handle instead of pointer and cleaning things consistently --- indra/llui/llfolderview.cpp | 27 ++++++++++++--------------- indra/llui/llfolderview.h | 7 +++++-- indra/llui/llfolderviewmodel.cpp | 8 -------- 3 files changed, 17 insertions(+), 25 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 4d1c2a38d0..225bf21b0a 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -167,16 +167,16 @@ LLFolderView::LLFolderView(const Params& p) mMinWidth(0), mDragAndDropThisFrame(FALSE), mCallbackRegistrar(NULL), - mParentPanel(p.parent_panel), mUseEllipses(p.use_ellipses), mDraggingOverItem(NULL), mStatusTextBox(NULL), mShowItemLinkOverlays(p.show_item_link_overlays), mViewModel(p.view_model) { + LLPanel* panel = p.parent_panel; + mParentPanel = panel->getHandle(); mViewModel->setFolderView(this); mRoot = this; - llinfos << "Merov : create folder view, this = " << this << ", name = " << (std::string(p.name)) << ", model = " << getFolderViewModel() << llendl; LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); @@ -244,7 +244,6 @@ LLFolderView::LLFolderView(const Params& p) // Destroys the object LLFolderView::~LLFolderView( void ) { - llinfos << "Merov : delete folder view (start), this = " << this << ", model = " << getFolderViewModel() << llendl; closeRenamer(); // The release focus call can potentially call the @@ -268,7 +267,6 @@ LLFolderView::~LLFolderView( void ) mViewModel->setFolderView(NULL); mViewModel = NULL; - llinfos << "Merov : delete folder view (end), this = " << this << ", model = " << getFolderViewModel() << llendl; } BOOL LLFolderView::canFocusChildren() const @@ -329,7 +327,7 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) { // Entry point of inventory filtering (CHUI-849) LLFastTimer t2(FTM_FILTER); - filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32(mParentPanel->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100)); + filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32(mParentPanel.get()->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100)); // Note: we filter the model, not the view getViewModelItem()->filter(filter); @@ -423,7 +421,7 @@ BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, if( selection && take_keyboard_focus) { - mParentPanel->setFocus(TRUE); + mParentPanel.get()->setFocus(TRUE); } // clear selection down here because change of keyboard focus can potentially @@ -761,7 +759,7 @@ void LLFolderView::removeSelectedItems() if (item_to_delete->remove()) { // change selection on successful delete - setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); + setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel.get()->hasFocus()); } } arrangeAll(); @@ -771,7 +769,7 @@ void LLFolderView::removeSelectedItems() LLDynamicArray listeners; LLFolderViewModelItem* listener; - setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); + setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel.get()->hasFocus()); for(S32 i = 0; i < count; ++i) { @@ -951,7 +949,7 @@ void LLFolderView::cut() } // Update the selection - setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); + setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel.get()->hasFocus()); } mSearchString.clear(); } @@ -1293,7 +1291,7 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char) } BOOL handled = FALSE; - if (mParentPanel->hasFocus()) + if (mParentPanel.get()->hasFocus()) { // SL-51858: Key presses are not being passed to the Popup menu. // A proper fix is non-trivial so instead just close the menu. @@ -1327,7 +1325,7 @@ BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask ) mKeyboardSelection = FALSE; mSearchString.clear(); - mParentPanel->setFocus(TRUE); + mParentPanel.get()->setFocus(TRUE); LLEditMenuHandler::gEditMenuHandler = this; @@ -1410,7 +1408,7 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) { // all user operations move keyboard focus to inventory // this way, we know when to stop auto-updating a search - mParentPanel->setFocus(TRUE); + mParentPanel.get()->setFocus(TRUE); BOOL handled = childrenHandleRightMouseDown(x, y, mask) != NULL; S32 count = mSelectedItems.size(); @@ -1608,7 +1606,6 @@ void LLFolderView::update() { return; } - //llinfos << "Merov : update, this = " << this << ", model = " << getFolderViewModel() << llendl; if (getFolderViewModel()->getFilter().isModified() && getFolderViewModel()->getFilter().isNotDefault()) { @@ -1655,8 +1652,8 @@ void LLFolderView::update() BOOL filter_finished = getViewModelItem()->passedFilter() && mViewModel->contentsReady(); if (filter_finished - || gFocusMgr.childHasKeyboardFocus(mParentPanel) - || gFocusMgr.childHasMouseCapture(mParentPanel)) + || gFocusMgr.childHasKeyboardFocus(mParentPanel.get()) + || gFocusMgr.childHasMouseCapture(mParentPanel.get())) { // finishing the filter process, giving focus to the folder view, or dragging the scrollbar all stop the auto select process mNeedsAutoSelect = FALSE; diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 11fccdace4..5b83049e5c 100755 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -229,7 +229,7 @@ public: void setCallbackRegistrar(LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* registrar) { mCallbackRegistrar = registrar; } - LLPanel* getParentPanel() { return mParentPanel; } + LLPanel* getParentPanel() { return mParentPanel.get(); } // DEBUG only void dumpSelectionInformation(); @@ -238,6 +238,9 @@ public: bool useLabelSuffix() { return mUseLabelSuffix; } void updateMenu(); + // Note: We may eventually have to move that method up the hierarchy to LLFolderViewItem. + LLHandle getHandle() const { return getDerivedHandle(); } + private: void updateMenuOptions(LLMenuGL* menu); void updateRenamerPosition(); @@ -295,7 +298,7 @@ protected: S32 mMinWidth; BOOL mDragAndDropThisFrame; - LLPanel* mParentPanel; + LLHandle mParentPanel; LLFolderViewModelInterface* mViewModel; diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index 48ca8156f2..3363dc5316 100755 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -36,10 +36,6 @@ bool LLFolderViewModelCommon::needsSort(LLFolderViewModelItem* item) std::string LLFolderViewModelCommon::getStatusText() { - if (!mFolderView) - { - llinfos << "Merov : Trying LLFolderViewModelCommon::getStatusText() on a NULL mFolderView!!!" << llendl; - } if (!contentsReady() || mFolderView->getViewModelItem()->getLastFilterGeneration() < getFilter().getCurrentGeneration()) { return LLTrans::getString("Searching"); @@ -52,10 +48,6 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { - if (!mFolderView) - { - llinfos << "Merov : Trying LLFolderViewModelCommon::filter() on a NULL mFolderView!!!" << llendl; - } getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrameVisible"), 1, 100)); mFolderView->getViewModelItem()->filter(getFilter()); } -- cgit v1.2.3 From c16de4df1834ccc15a6776c4fef7abb1789c2099 Mon Sep 17 00:00:00 2001 From: merov Date: Fri, 22 Nov 2013 20:16:03 +0000 Subject: ACME-1219 : Fix crash on exit on Windows 7 --- indra/llui/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 87cc070770..704e03a605 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -265,7 +265,7 @@ LLFolderView::~LLFolderView( void ) mItems.clear(); mFolders.clear(); - mViewModel->setFolderView(NULL); + //mViewModel->setFolderView(NULL); mViewModel = NULL; } -- cgit v1.2.3