diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/llui/lluictrl.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/llui/lluictrl.cpp')
-rw-r--r-- | linden/indra/llui/lluictrl.cpp | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/linden/indra/llui/lluictrl.cpp b/linden/indra/llui/lluictrl.cpp index b2c14df..9d97312 100644 --- a/linden/indra/llui/lluictrl.cpp +++ b/linden/indra/llui/lluictrl.cpp | |||
@@ -18,7 +18,8 @@ | |||
18 | * There are special exceptions to the terms and conditions of the GPL as | 18 | * There are special exceptions to the terms and conditions of the GPL as |
19 | * it is applied to this Source Code. View the full text of the exception | 19 | * it is applied to this Source Code. View the full text of the exception |
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 20 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
21 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 21 | * online at |
22 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
22 | * | 23 | * |
23 | * By copying, modifying or distributing this software, you acknowledge | 24 | * By copying, modifying or distributing this software, you acknowledge |
24 | * that you have read and understood your obligations described above, | 25 | * that you have read and understood your obligations described above, |
@@ -475,10 +476,10 @@ BOOL LLUICtrl::focusPrevItem(BOOL text_fields_only) | |||
475 | return focusPrev(result); | 476 | return focusPrev(result); |
476 | } | 477 | } |
477 | 478 | ||
478 | LLUICtrl* LLUICtrl::findRootMostFocusRoot() const | 479 | LLUICtrl* LLUICtrl::findRootMostFocusRoot() |
479 | { | 480 | { |
480 | const LLUICtrl* focus_root = NULL; | 481 | LLUICtrl* focus_root = NULL; |
481 | const LLUICtrl* next_view = this; | 482 | LLUICtrl* next_view = this; |
482 | while(next_view) | 483 | while(next_view) |
483 | { | 484 | { |
484 | if (next_view->isFocusRoot()) | 485 | if (next_view->isFocusRoot()) |
@@ -487,9 +488,8 @@ LLUICtrl* LLUICtrl::findRootMostFocusRoot() const | |||
487 | } | 488 | } |
488 | next_view = next_view->getParentUICtrl(); | 489 | next_view = next_view->getParentUICtrl(); |
489 | } | 490 | } |
490 | // since focus_root could be this, need to cast away const to return | 491 | |
491 | // a non-const result | 492 | return focus_root; |
492 | return const_cast<LLUICtrl*>(focus_root); | ||
493 | } | 493 | } |
494 | 494 | ||
495 | 495 | ||
@@ -551,19 +551,6 @@ LLView* LLUICtrl::fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFacto | |||
551 | } | 551 | } |
552 | 552 | ||
553 | 553 | ||
554 | // *NOTE: If other classes derive from LLPanel, they will need to be | ||
555 | // added to this function. | ||
556 | LLPanel* LLUICtrl::getParentPanel() const | ||
557 | { | ||
558 | LLView* parent = getParent(); | ||
559 | LLPanel* parent_panel = dynamic_cast<LLPanel*>(parent); | ||
560 | while (!parent_panel) | ||
561 | { | ||
562 | parent = parent->getParent(); | ||
563 | } | ||
564 | return (LLPanel*)(parent); | ||
565 | } | ||
566 | |||
567 | // Skip over any parents that are not LLUICtrl's | 554 | // Skip over any parents that are not LLUICtrl's |
568 | // Used in focus logic since only LLUICtrl elements can have focus | 555 | // Used in focus logic since only LLUICtrl elements can have focus |
569 | LLUICtrl* LLUICtrl::getParentUICtrl() const | 556 | LLUICtrl* LLUICtrl::getParentUICtrl() const |