diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmenugl.cpp | 15 | ||||
-rw-r--r-- | indra/llui/llmenugl.h | 3 | ||||
-rw-r--r-- | indra/llui/llscrollingpanellist.cpp | 23 | ||||
-rw-r--r-- | indra/llui/llscrollingpanellist.h | 3 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 9 |
5 files changed, 26 insertions, 27 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index e5c32846a0..b51884f8c0 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3003,21 +3003,6 @@ BOOL LLMenuBarGL::handleMouseDown(S32 x, S32 y, MASK mask) return LLMenuGL::handleMouseDown(x, y, mask); } -/* -BOOL LLMenuBarGL::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - // clicks on menu bar closes existing menus from other contexts but leave - // own menu open so that we get toggle behavior - if (!getHighlightedItem() || !getHighlightedItem()->isActive()) - { - LLMenuGL::sMenuContainer->hideMenus(); - } - - return LLMenuGL::handleMouseDown(x, y, mask); -} -*/ - - void LLMenuBarGL::draw() { LLMenuItemGL* itemp = getHighlightedItem(); diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 930276f7bc..1058877d10 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -709,9 +709,6 @@ public: /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); /*virtual*/ BOOL handleJumpKey(KEY key); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); -// /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - - /*virtual*/ void draw(); /*virtual*/ BOOL jumpKeysActive(); diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp index 0159cdd12c..13fbe1d576 100644 --- a/indra/llui/llscrollingpanellist.cpp +++ b/indra/llui/llscrollingpanellist.cpp @@ -55,8 +55,6 @@ void LLScrollingPanelList::addPanel( LLScrollingPanel* panel ) addChildInBack( panel ); mPanelList.push_front( panel ); - const S32 GAP_BETWEEN_PANELS = 6; - // Resize this view S32 total_height = 0; S32 max_width = 0; @@ -83,6 +81,27 @@ void LLScrollingPanelList::addPanel( LLScrollingPanel* panel ) } } +void LLScrollingPanelList::removePanel(LLScrollingPanel* panel) +{ + U32 index = 0; + LLScrollingPanelList::panel_list_t::const_iterator iter; + + if (!mPanelList.empty()) + { + for (iter = mPanelList.begin(); iter != mPanelList.end(); ++iter, ++index) + { + if (*iter == panel) + { + break; + } + } + if(iter != mPanelList.end()) + { + removePanel(index); + } + } +} + void LLScrollingPanelList::removePanel( U32 panel_index ) { if ( mPanelList.empty() || panel_index >= mPanelList.size() ) diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h index 5dc23facda..9da15822d0 100644 --- a/indra/llui/llscrollingpanellist.h +++ b/indra/llui/llscrollingpanellist.h @@ -68,6 +68,8 @@ public: : LLUICtrl(p) {} + static const S32 GAP_BETWEEN_PANELS = 6; + typedef std::deque<LLScrollingPanel*> panel_list_t; virtual void setValue(const LLSD& value) {}; @@ -76,6 +78,7 @@ public: void clearPanels(); void addPanel( LLScrollingPanel* panel ); + void removePanel( LLScrollingPanel* panel ); void removePanel( U32 panel_index ); void updatePanels(BOOL allow_modify); const panel_list_t& getPanelList() { return mPanelList; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index e3b61dfaa2..0ba028e1c8 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -947,16 +947,11 @@ BOOL LLView::handleDoubleClick(S32 x, S32 y, MASK mask) BOOL LLView::handleScrollWheel(S32 x, S32 y, S32 clicks) { - BOOL handled = FALSE; if( getVisible() && getEnabled() ) { - handled = childrenHandleScrollWheel( x, y, clicks ) != NULL; - if( !handled && blockMouseEvent(x, y) ) - { - handled = TRUE; - } + return childrenHandleScrollWheel( x, y, clicks ) != NULL; } - return handled; + return FALSE; } BOOL LLView::handleRightMouseDown(S32 x, S32 y, MASK mask) |