From 1a456c2e41905e93e393dc2dda0d143ee7611275 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 9 Dec 2013 13:02:06 +0200
Subject: MAINT-3539 Additional checking was added to avoid possible crash.

---
 indra/llui/llview.cpp | 89 ++++++++++++++++++++++++++-------------------------
 1 file changed, 46 insertions(+), 43 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 9cc8c951d5..5ee2169b66 100755
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1314,52 +1314,55 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent)
 		// move child views according to reshape flags
 		BOOST_FOREACH(LLView* viewp, mChildList)
 		{
-			LLRect child_rect( viewp->mRect );
-
-			if (viewp->followsRight() && viewp->followsLeft())
-			{
-				child_rect.mRight += delta_width;
-			}
-			else if (viewp->followsRight())
-			{
-				child_rect.mLeft += delta_width;
-				child_rect.mRight += delta_width;
-			}
-			else if (viewp->followsLeft())
+			if (viewp != NULL)
 			{
-				// left is 0, don't need to adjust coords
-			}
-			else
-			{
-				// BUG what to do when we don't follow anyone?
-				// for now, same as followsLeft
-			}
+				LLRect child_rect( viewp->mRect );
 
-			if (viewp->followsTop() && viewp->followsBottom())
-			{
-				child_rect.mTop += delta_height;
-			}
-			else if (viewp->followsTop())
-			{
-				child_rect.mTop += delta_height;
-				child_rect.mBottom += delta_height;
-			}
-			else if (viewp->followsBottom())
-			{
-				// bottom is 0, so don't need to adjust coords
-			}
-			else
-			{
-				// BUG what to do when we don't follow?
-				// for now, same as bottom
-			}
+				if (viewp->followsRight() && viewp->followsLeft())
+				{
+					child_rect.mRight += delta_width;
+				}
+				else if (viewp->followsRight())
+				{
+					child_rect.mLeft += delta_width;
+					child_rect.mRight += delta_width;
+				}
+				else if (viewp->followsLeft())
+				{
+					// left is 0, don't need to adjust coords
+				}
+				else
+				{
+					// BUG what to do when we don't follow anyone?
+					// for now, same as followsLeft
+				}
 
-			S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft;
-			S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom;
-			viewp->translate( delta_x, delta_y );
-			if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight())
-			{
-				viewp->reshape(child_rect.getWidth(), child_rect.getHeight());
+				if (viewp->followsTop() && viewp->followsBottom())
+				{
+					child_rect.mTop += delta_height;
+				}
+				else if (viewp->followsTop())
+				{
+					child_rect.mTop += delta_height;
+					child_rect.mBottom += delta_height;
+				}
+				else if (viewp->followsBottom())
+				{
+					// bottom is 0, so don't need to adjust coords
+				}
+				else
+				{
+					// BUG what to do when we don't follow?
+					// for now, same as bottom
+				}
+
+				S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft;
+				S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom;
+				viewp->translate( delta_x, delta_y );
+				if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight())
+				{
+					viewp->reshape(child_rect.getWidth(), child_rect.getHeight());
+				}
 			}
 		}
 	}
-- 
cgit v1.2.3


From 813bc232e7175ba3e20a70f16427d12c7681a996 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Mon, 9 Dec 2013 15:42:51 -0800
Subject: MAINT-3017 FIX Inventory filter for Recent tab does not persist
 between sessions as it used to. added names back to inventory filters, so
 they can be deserialized

---
 indra/llui/llfolderview.cpp    | 12 +++++++-----
 indra/llui/llfolderviewmodel.h | 33 +++++++++++++++++++++------------
 2 files changed, 28 insertions(+), 17 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index f32a52e6c6..884fd0ed0f 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1599,19 +1599,21 @@ void LLFolderView::update()
 	// until that inventory is loaded up.
 	LLFastTimer t2(FTM_INVENTORY);
 
-	if (getFolderViewModel()->getFilter().isModified() && getFolderViewModel()->getFilter().isNotDefault())
+	LLFolderViewFilter& filter_object = getFolderViewModel()->getFilter();
+
+	if (filter_object.isModified() && filter_object.isNotDefault())
 	{
 		mNeedsAutoSelect = TRUE;
 	}
     
 	// Filter to determine visibility before arranging
-	filter(getFolderViewModel()->getFilter());
+	filter(filter_object);
     
 	// Clear the modified setting on the filter only if the filter finished after running the filter process
 	// Note: if the filter count has timed out, that means the filter halted before completing the entire set of items
-    if (getFolderViewModel()->getFilter().isModified() && (!getFolderViewModel()->getFilter().isTimedOut()))
+    if (filter_object.isModified() && (!filter_object.isTimedOut()))
 	{
-		getFolderViewModel()->getFilter().clearModified();
+		filter_object.clearModified();
 	}
 
 	// automatically show matching items, and select first one if we had a selection
@@ -1630,7 +1632,7 @@ void LLFolderView::update()
 
 		// Open filtered folders for folder views with mAutoSelectOverride=TRUE.
 		// Used by LLPlacesFolderView.
-		if (getFolderViewModel()->getFilter().showAllResults())
+		if (filter_object.showAllResults())
 		{
 			// these are named variables to get around gcc not binding non-const references to rvalues
 			// and functor application is inherently non-const to allow for stateful functors
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index b1bcc8bbb4..a909d13f97 100755
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -386,27 +386,36 @@ template <typename SORT_TYPE, typename ITEM_TYPE, typename FOLDER_TYPE, typename
 class LLFolderViewModel : public LLFolderViewModelCommon
 {
 public:
-	LLFolderViewModel(){}
-	virtual ~LLFolderViewModel() {}
-
 	typedef SORT_TYPE		SortType;
 	typedef ITEM_TYPE		ItemType;
 	typedef FOLDER_TYPE		FolderType;
 	typedef FILTER_TYPE		FilterType;
 
-	virtual SortType& getSorter()					 { return mSorter; }
-	virtual const SortType& getSorter() const 		 { return mSorter; }
-	virtual void setSorter(const SortType& sorter) 	 { mSorter = sorter; requestSortAll(); }
+	LLFolderViewModel(SortType* sorter, FilterType* filter) 
+	:	mSorter(sorter),
+		mFilter(filter)
+	{}
 
-	virtual FilterType& getFilter() 				 { return mFilter; }
-	virtual const FilterType& getFilter() const		 { return mFilter; }
-	virtual void setFilter(const FilterType& filter) { mFilter = filter; }
+	virtual ~LLFolderViewModel() 
+	{
+		delete mSorter;
+		mSorter = NULL;
+		delete mFilter;
+		mFilter = NULL;
+	}
+
+	virtual SortType& getSorter()					 { return *mSorter; }
+	virtual const SortType& getSorter() const 		 { return *mSorter; }
+	virtual void setSorter(const SortType& sorter) 	 { mSorter = new SortType(sorter); requestSortAll(); }
+
+	virtual FilterType& getFilter() 				 { return *mFilter; }
+	virtual const FilterType& getFilter() const		 { return *mFilter; }
+	virtual void setFilter(const FilterType& filter) { mFilter = new FilterType(filter); }
 
 	// By default, we assume the content is available. If a network fetch mechanism is implemented for the model,
 	// this method needs to be overloaded and return the relevant fetch status.
 	virtual bool contentsReady()					{ return true; }
 
-
 	struct ViewModelCompare
 	{
 		ViewModelCompare(const SortType& sorter)
@@ -438,8 +447,8 @@ public:
 	}
 
 protected:
-	SortType		mSorter;
-	FilterType		mFilter;
+	SortType*		mSorter;
+	FilterType*		mFilter;
 };
 
 #endif // LLFOLDERVIEWMODEL_H
-- 
cgit v1.2.3


From c243578337cb4be0d0445dba90719dd279a54cb5 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 8 Jan 2014 12:34:35 +0200
Subject: =?UTF-8?q?MAINT-3520=20FIXED=20=D0=A1all=20arrange(NULL,=20NULL)?=
 =?UTF-8?q?=20to=20avoid=20occasional=20drag'n'drop=20folders=20after=20re?=
 =?UTF-8?q?naming.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 indra/llui/llfolderview.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra/llui')

diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 884fd0ed0f..13d231d712 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -629,6 +629,8 @@ bool LLFolderView::startDrag()
 void LLFolderView::commitRename( const LLSD& data )
 {
 	finishRenamingItem();
+	arrange( NULL, NULL );
+
 }
 
 void LLFolderView::draw()
-- 
cgit v1.2.3


From 4d81b1d967fbfa68f97f37d8d162b1ac9900a4b0 Mon Sep 17 00:00:00 2001
From: MaximB ProductEngine <mberezhnoy@productengine.com>
Date: Tue, 14 Jan 2014 10:00:30 +0200
Subject: MAINT-3510 (Incorrect context menu entry in Places floater)

---
 indra/llui/llfolderview.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index 11fccdace4..c28660819f 100755
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -236,7 +236,7 @@ public:
 	virtual S32	notify(const LLSD& info) ;
 	
 	bool useLabelSuffix() { return mUseLabelSuffix; }
-	void updateMenu();
+	virtual void updateMenu();
 
 private:
 	void updateMenuOptions(LLMenuGL* menu);
-- 
cgit v1.2.3


From 74c7460846f08d0a2c45589c670e55988a951965 Mon Sep 17 00:00:00 2001
From: "maxim@mnikolenko" <maxim@mnikolenko>
Date: Mon, 20 Jan 2014 12:48:58 +0200
Subject: MAINT-3618 FIXED Don't copy spaces after cursor to the next line.

---
 indra/llui/lltexteditor.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/llui')

diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 81d9fd1ec9..7896fcef95 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2338,7 +2338,8 @@ void LLTextEditor::autoIndent()
 	S32 i;
 
 	LLWString text = getWText();
-	while( ' ' == text[line_start] )
+	S32 offset = getLineOffsetFromDocIndex(mCursorPos);
+	while(( ' ' == text[line_start] ) && (space_count < offset))
 	{
 		space_count++;
 		line_start++;
-- 
cgit v1.2.3


From 1033c9d67f6bf3fd317bc2e6a6990e2b7e5d80c8 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Wed, 5 Feb 2014 20:45:09 +0200
Subject: MAINT-3555 crash in LLPanel::~LLPanel() on shutdown:  - memory leaks
 fixing;

---
 indra/llui/llpanel.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index e63b41f97c..17b9b91ba7 100755
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -330,17 +330,16 @@ private:
 
 // local static instance for registering a particular panel class
 template<typename T>
-class LLRegisterPanelClassWrapper
-:	public LLRegisterPanelClass
+	class LLPanelInjector
 {
 public:
-	// reigister with either the provided builder, or the generic templated builder
-	LLRegisterPanelClassWrapper(const std::string& tag);
+	// register with either the provided builder, or the generic templated builder
+	LLPanelInjector(const std::string& tag);
 };
 
 
 template<typename T>
-LLRegisterPanelClassWrapper<T>::LLRegisterPanelClassWrapper(const std::string& tag) 
+	LLPanelInjector<T>::LLPanelInjector(const std::string& tag) 
 {
 	LLRegisterPanelClass::instance().addPanelClass(tag,&LLRegisterPanelClass::defaultPanelClassBuilder<T>);
 }
-- 
cgit v1.2.3


From 0b9eeb02abe4d10c4e252fe35ea55ba4b54b581e Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Mon, 24 Feb 2014 18:36:13 -0800
Subject: MAINT-2059 FIX Corner scaling doesn't highlight distance text much
 cleanup of vector math also made Stretch Both Sides checkbox clickable via
 label

---
 indra/llui/llfloater.cpp      | 24 ++++++++++++------------
 indra/llui/lllayoutstack.cpp  | 10 +++++-----
 indra/llui/llpanel.cpp        |  8 ++++----
 indra/llui/lltabcontainer.cpp | 10 +++++-----
 indra/llui/lluictrl.cpp       | 24 ++++++++++++------------
 indra/llui/llview.cpp         | 20 ++++++++++----------
 6 files changed, 48 insertions(+), 48 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 96964b528e..41aa68e0b3 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -505,48 +505,48 @@ void LLFloater::destroy()
 // virtual
 LLFloater::~LLFloater()
 {
-	LL_INFOS("Baker") << "[3555] ~LLFloater() -------------------------------------------------" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() -------------------------------------------------" << LL_ENDL;
 	
 	LLFloaterReg::removeInstance(mInstanceName, mKey);
 	
-	LL_INFOS("Baker") << "[3555] ~LLFloater() - Does child have keyboard focus?" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Does child have keyboard focus?" << LL_ENDL;
 	if( gFocusMgr.childHasKeyboardFocus(this))
 	{
-		LL_INFOS("Baker") << "[3555] ~LLFloater() - Yes, release the focus." << LL_ENDL;
+		LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Yes, release the focus." << LL_ENDL;
 		// Just in case we might still have focus here, release it.
 		releaseFocus();
 	}
 
-	LL_INFOS("Baker") << "[3555] ~LLFloater() - Setting minimized to false" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Setting minimized to false" << LL_ENDL;
 	// This is important so that floaters with persistent rects (i.e., those
 	// created with rect control rather than an LLRect) are restored in their
 	// correct, non-minimized positions.
 	setMinimized( FALSE );
 
-	LL_INFOS("Baker") << "[3555] ~LLFloater() - Deleting the drag handle." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Deleting the drag handle." << LL_ENDL;
 	delete mDragHandle;
 	for (S32 i = 0; i < 4; i++) 
 	{
-		LL_INFOS("Baker") << "[3555] ~LLFloater() - Deleting mResizeBar[" << i << "]" << LL_ENDL;
+		LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Deleting mResizeBar[" << i << "]" << LL_ENDL;
 		delete mResizeBar[i];
 
-		LL_INFOS("Baker") << "[3555] ~LLFloater() - Deleting mResizeHandle[" << i << "]" << LL_ENDL;
+		LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Deleting mResizeHandle[" << i << "]" << LL_ENDL;
 		delete mResizeHandle[i];
 	}
 
-	LL_INFOS("Baker") << "[3555] ~LLFloater() - Setting visibility (false)" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Setting visibility (false)" << LL_ENDL;
 	setVisible(false); // We're not visible if we're destroyed
 	
-	LL_INFOS("Baker") << "[3555] ~LLFloater() - Storing visibility control" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Storing visibility control" << LL_ENDL;
 	storeVisibilityControl();
 	
-	LL_INFOS("Baker") << "[3555] ~LLFloater() - Storing dock state control" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Storing dock state control" << LL_ENDL;
 	storeDockStateControl();
 
-	LL_INFOS("Baker") << "[3555] ~LLFloater() - Delete mMinimizeSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLFloater() - Delete mMinimizeSignal" << LL_ENDL;
 	delete mMinimizeSignal;
 
-	LL_INFOS("Baker") << "[3555] Exiting ~LLFloater()" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] Exiting ~LLFloater()" << LL_ENDL;
 }
 
 void LLFloater::storeRectControl()
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 953025abbf..ec0795fc89 100755
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -245,18 +245,18 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
 
 LLLayoutStack::~LLLayoutStack()
 {
-	LL_INFOS("Baker") << "[3555] ~LLLayoutStack() -------------------------------------------------" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLLayoutStack() -------------------------------------------------" << LL_ENDL;
 	
-	LL_INFOS("Baker") << "[3555] ~LLLayoutStack() - Copying panel pointers." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLLayoutStack() - Copying panel pointers." << LL_ENDL;
 	e_panel_list_t panels = mPanels; // copy list of panel pointers
 
-	LL_INFOS("Baker") << "[3555] ~LLLayoutStack() - Clearing mPanels." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLLayoutStack() - Clearing mPanels." << LL_ENDL;
 	mPanels.clear(); // clear so that removeChild() calls don't cause trouble
 	
-	LL_INFOS("Baker") << "[3555] ~LLLayoutStack() - Deleing copied panel pointers." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLLayoutStack() - Deleing copied panel pointers." << LL_ENDL;
 	std::for_each(panels.begin(), panels.end(), DeletePointer());
 
-	LL_INFOS("Baker") << "[3555] Exiting ~LLLayoutStack()" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] Exiting ~LLLayoutStack()" << LL_ENDL;
 }
 
 void LLLayoutStack::draw()
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 3ee93150f5..dafb6a534a 100755
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -126,13 +126,13 @@ LLPanel::LLPanel(const LLPanel::Params& p)
 
 LLPanel::~LLPanel()
 {
-	LL_INFOS("Baker") << "[3555] ~LLPanel() -------------------------------------------------" << LL_ENDL;
-	LL_INFOS("Baker") << "[3555] ~LLPanel() - Deleting mVisibleSignal..." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLPanel() -------------------------------------------------" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLPanel() - Deleting mVisibleSignal..." << LL_ENDL;
 
 	delete mVisibleSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLPanel() - deleted." << LL_ENDL;
-	LL_INFOS("Baker") << "[3555] Exiting ~LLPanel()" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLPanel() - deleted." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] Exiting ~LLPanel()" << LL_ENDL;
 }
 
 // virtual
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 203bf5b50e..99237c74ba 100755
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -280,16 +280,16 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
 
 LLTabContainer::~LLTabContainer()
 {
-	LL_INFOS("Baker") << "[3555] ~LLTabContainer() -------------------------------------------------" << LL_ENDL;
-	LL_INFOS("Baker") << "[3555] ~LLTabContainer() - Deleting mTabList contents..." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLTabContainer() -------------------------------------------------" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLTabContainer() - Deleting mTabList contents..." << LL_ENDL;
 	
 	std::for_each(mTabList.begin(), mTabList.end(), DeletePointer());
 	
-	LL_INFOS("Baker") << "[3555] ~LLTabContainer() - Clearing mTabList" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLTabContainer() - Clearing mTabList" << LL_ENDL;
 	mTabList.clear();
 	
-	LL_INFOS("Baker") << "[3555] ~LLTabContainer() - done." << LL_ENDL;
-	LL_INFOS("Baker") << "[3555] Exiting ~LLTabContainer()" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLTabContainer() - done." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] Exiting ~LLTabContainer()" << LL_ENDL;
 }
 
 //virtual
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 801d39ac70..ad0fe0c556 100755
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -207,11 +207,11 @@ void LLUICtrl::initFromParams(const Params& p)
 
 LLUICtrl::~LLUICtrl()
 {
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() -------------------------------------------------" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() -------------------------------------------------" << LL_ENDL;
 	
 	gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - Released focus if needed." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - Released focus if needed." << LL_ENDL;
 
 	if( gFocusMgr.getTopCtrl() == this )
 	{
@@ -220,34 +220,34 @@ LLUICtrl::~LLUICtrl()
 		gFocusMgr.removeTopCtrlWithoutCallback( this );
 	}
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mCommitSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mCommitSignal" << LL_ENDL;
 	delete mCommitSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mValidateSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mValidateSignal" << LL_ENDL;
 	delete mValidateSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseEnterSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseEnterSignal" << LL_ENDL;
 	delete mMouseEnterSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseLeaveSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseLeaveSignal" << LL_ENDL;
 	delete mMouseLeaveSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseDownSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseDownSignal" << LL_ENDL;
 	delete mMouseDownSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseUpSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mMouseUpSignal" << LL_ENDL;
 	delete mMouseUpSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mRightMouseDownSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mRightMouseDownSignal" << LL_ENDL;
 	delete mRightMouseDownSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mRightMouseUpSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mRightMouseUpSignal" << LL_ENDL;
 	delete mRightMouseUpSignal;
 
-	LL_INFOS("Baker") << "[3555] ~LLUICtrl() - deleting mDoubleClickSignal" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLUICtrl() - deleting mDoubleClickSignal" << LL_ENDL;
 	delete mDoubleClickSignal;
 
-	LL_INFOS("Baker") << "[3555] Exiting ~LLUICtrl()" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] Exiting ~LLUICtrl()" << LL_ENDL;
 }
 
 void default_commit_handler(LLUICtrl* ctrl, const LLSD& param)
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index daa87e8334..8d1c0a28c8 100755
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -150,15 +150,15 @@ LLView::LLView(const LLView::Params& p)
 
 LLView::~LLView()
 {
-	LL_INFOS("Baker") << "[3555] ~LLView -------------------------------------------------" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLView -------------------------------------------------" << LL_ENDL;
 	
-	LL_INFOS("Baker") << "[3555] ~LLView() - Dirtying view rect" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLView() - Dirtying view rect" << LL_ENDL;
 	dirtyRect();
 	//llinfos << "Deleting view " << mName << ":" << (void*) this << llendl;
-	LL_INFOS("Baker") << "[3555] ~LLView() - Deleting view " << mName << ":" << (void*) this << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLView() - Deleting view " << mName << ":" << (void*) this << LL_ENDL;
 	if (LLView::sIsDrawing)
 	{
-		LL_INFOS("Baker") << "[3555] ~LLView() - Deleting view " << mName << " during UI draw() phase" << LL_ENDL;
+		LL_DEBUGS("Baker") << "[3555] ~LLView() - Deleting view " << mName << " during UI draw() phase" << LL_ENDL;
 	
 		lldebugs << "Deleting view " << mName << " during UI draw() phase" << llendl;
 	}
@@ -169,30 +169,30 @@ LLView::~LLView()
 	if( hasMouseCapture() )
 	{
 		//llwarns << "View holding mouse capture deleted: " << getName() << ".  Mouse capture removed." << llendl;
-		LL_INFOS("Baker") << "[3555] ~LLView() - View holding mouse capture deleted: " << getName() << ".  Mouse capture removed." << LL_ENDL;
+		LL_DEBUGS("Baker") << "[3555] ~LLView() - View holding mouse capture deleted: " << getName() << ".  Mouse capture removed." << LL_ENDL;
 		gFocusMgr.removeMouseCaptureWithoutCallback( this );
 	}
 
-	LL_INFOS("Baker") << "[3555] ~LLView() - Deleting all children..." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLView() - Deleting all children..." << LL_ENDL;
 	deleteAllChildren();
 
-	LL_INFOS("Baker") << "[3555] ~LLView() - done." << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] ~LLView() - done." << LL_ENDL;
 
 	if (mParentView != NULL)
 	{
-		LL_INFOS("Baker") << "[3555] ~LLView() - Removing this child view" << LL_ENDL;
+		LL_DEBUGS("Baker") << "[3555] ~LLView() - Removing this child view" << LL_ENDL;
 		mParentView->removeChild(this);
 	}
 
 	if (mDefaultWidgets)
 	{
-		LL_INFOS("Baker") << "[3555] ~LLView() - Deleting default widgets" << LL_ENDL;
+		LL_DEBUGS("Baker") << "[3555] ~LLView() - Deleting default widgets" << LL_ENDL;
 
 		delete mDefaultWidgets;
 		mDefaultWidgets = NULL;
 	}
 
-	LL_INFOS("Baker") << "[3555] Exiting ~LLView()" << LL_ENDL;
+	LL_DEBUGS("Baker") << "[3555] Exiting ~LLView()" << LL_ENDL;
 }
 
 // virtual
-- 
cgit v1.2.3


From 7a45e6fd7716ede5cf7b5481542cde039de62509 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Fri, 28 Feb 2014 15:33:09 +0200
Subject: MAINT-358 FIXED [PUBLIC]Verbs buttons are available for landmarks
 folder if it was selected via keyboard

---
 indra/llui/llfolderview.cpp | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 13d231d712..173279fa81 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1127,18 +1127,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 		if((mSelectedItems.size() > 0) && mScrollContainer)
 		{
 			LLFolderViewItem* last_selected = getCurSelectedItem();
+			BOOL shift_select = mask & MASK_SHIFT;
+			// don't shift select down to children of folders (they are implicitly selected through parent)
+			LLFolderViewItem* next = last_selected->getNextOpenNode(!shift_select);
 
-			if (!mKeyboardSelection)
+			if (!mKeyboardSelection || (!shift_select && (!next || next == last_selected)))
 			{
 				setSelection(last_selected, FALSE, TRUE);
 				mKeyboardSelection = TRUE;
 			}
 
-			LLFolderViewItem* next = NULL;
-			if (mask & MASK_SHIFT)
+			if (shift_select)
 			{
-				// don't shift select down to children of folders (they are implicitly selected through parent)
-				next = last_selected->getNextOpenNode(FALSE);
 				if (next)
 				{
 					if (next->isSelected())
@@ -1155,7 +1155,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 			}
 			else
 			{
-				next = last_selected->getNextOpenNode();
 				if( next )
 				{
 					if (next == last_selected)
@@ -1191,18 +1190,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 		if((mSelectedItems.size() > 0) && mScrollContainer)
 		{
 			LLFolderViewItem* last_selected = mSelectedItems.back();
+			BOOL shift_select = mask & MASK_SHIFT;
+			// don't shift select down to children of folders (they are implicitly selected through parent)
+			LLFolderViewItem* prev = prev = last_selected->getPreviousOpenNode(!shift_select);
 
-			if (!mKeyboardSelection)
+			if (!mKeyboardSelection || (!shift_select && prev == this))
 			{
 				setSelection(last_selected, FALSE, TRUE);
 				mKeyboardSelection = TRUE;
 			}
 
-			LLFolderViewItem* prev = NULL;
-			if (mask & MASK_SHIFT)
+			if (shift_select)
 			{
-				// don't shift select down to children of folders (they are implicitly selected through parent)
-				prev = last_selected->getPreviousOpenNode(FALSE);
 				if (prev)
 				{
 					if (prev->isSelected())
@@ -1219,7 +1218,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 			}
 			else
 			{
-				prev = last_selected->getPreviousOpenNode();
 				if( prev )
 				{
 					if (prev == this)
-- 
cgit v1.2.3


From 65850279964bed111e0d11b99f26867cd46b91b7 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 5 Mar 2014 12:25:52 +0200
Subject: fix build problem

---
 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 173279fa81..c9ea0c0e1b 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1192,7 +1192,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
 			LLFolderViewItem* last_selected = mSelectedItems.back();
 			BOOL shift_select = mask & MASK_SHIFT;
 			// don't shift select down to children of folders (they are implicitly selected through parent)
-			LLFolderViewItem* prev = prev = last_selected->getPreviousOpenNode(!shift_select);
+			LLFolderViewItem* prev = last_selected->getPreviousOpenNode(!shift_select);
 
 			if (!mKeyboardSelection || (!shift_select && prev == this))
 			{
-- 
cgit v1.2.3


From 635a3309f05f77e302ea430ca2277fea193a41f4 Mon Sep 17 00:00:00 2001
From: maksymsproductengine <maksymsproductengine@lindenlab.com>
Date: Thu, 6 Mar 2014 05:51:49 +0200
Subject: MAINT-3610 FIXED SL viewer partly 'eats' chat-messages

---
 indra/llui/llchatentry.cpp  | 10 +---------
 indra/llui/lltexteditor.cpp |  5 +++--
 indra/llui/lltexteditor.h   |  2 ++
 3 files changed, 6 insertions(+), 11 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp
index c04b70eb64..dac001afab 100755
--- a/indra/llui/llchatentry.cpp
+++ b/indra/llui/llchatentry.cpp
@@ -51,6 +51,7 @@ LLChatEntry::LLChatEntry(const Params& p)
 	mCurrentHistoryLine = mLineHistory.begin();
 
 	mAutoIndent = false;
+	keepSelectionOnReturn(true);
 }
 
 LLChatEntry::~LLChatEntry()
@@ -179,15 +180,6 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
 {
 	BOOL handled = FALSE;
 
-    // In the case of a chat entry, pressing RETURN when something is selected
-    // should NOT erase the selection (unlike a notecard, for example)
-    if (key == KEY_RETURN)
-    {
-        endOfDoc();
-        startSelection();
-        endSelection();
-    }
-
 	LLTextEditor::handleSpecialKey(key, mask);
 
 	switch(key)
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 3bac15c5d4..6c4d031907 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -264,7 +264,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
 	mContextMenu(NULL),
 	mShowContextMenu(p.show_context_menu),
 	mEnableTooltipPaste(p.enable_tooltip_paste),
-	mPassDelete(FALSE)
+	mPassDelete(FALSE),
+	mKeepSelectionOnReturn(false)
 {
 	mSourceID.generate();
 
@@ -1664,7 +1665,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask)
 	case KEY_RETURN:
 		if (mask == MASK_NONE)
 		{
-			if( hasSelection() )
+			if( hasSelection() && !mKeepSelectionOnReturn )
 			{
 				deleteSelection(FALSE);
 			}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index d3b7bc0eb7..02a76d2f8a 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -295,6 +295,7 @@ protected:
 
 	/*virtual*/ void	updateSegments();
 	void				updateLinkSegments();
+	void				keepSelectionOnReturn(bool keep) { mKeepSelectionOnReturn = keep; }
 
 private:
 	//
@@ -338,6 +339,7 @@ private:
 	bool			mParseOnTheFly;
 	bool			mEnableTooltipPaste;
 	bool			mPassDelete;
+	bool			mKeepSelectionOnReturn;	// disabling of removing selected text after pressing of Enter
 
 	LLUUID			mSourceID;
 
-- 
cgit v1.2.3