From a02f2e63f20021d007a6a20c33cc961500b14236 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Thu, 21 Jun 2012 10:11:55 -0700
Subject: [PATCH] CHUI-101 WIP Make LLFolderview general purpose one more gcc
 build fix

---
 indra/newview/llfolderview.cpp     | 7 +++++--
 indra/newview/llinventorypanel.cpp | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 2bc6f26c85e..6bae1d5644c 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -289,6 +289,9 @@ LLFolderView::~LLFolderView( void )
 
 	delete mFilter;
 	mFilter = NULL;
+
+	delete mViewModel;
+	mViewModel = NULL;
 }
 
 BOOL LLFolderView::canFocusChildren() const
@@ -345,12 +348,12 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
 	LLFolderViewFolder::arrange(&mMinWidth, &target_height, mFilter->getFirstSuccessGeneration());
 
 	LLRect scroll_rect = mScrollContainer->getContentWindowRect();
-	reshape( llmax(scroll_rect.getWidth(), mMinWidth), mCurHeight );
+	reshape( llmax(scroll_rect.getWidth(), mMinWidth), llround(mCurHeight) );
 
 	LLRect new_scroll_rect = mScrollContainer->getContentWindowRect();
 	if (new_scroll_rect.getWidth() != scroll_rect.getWidth())
 	{
-		reshape( llmax(scroll_rect.getWidth(), mMinWidth), mCurHeight );
+		reshape( llmax(scroll_rect.getWidth(), mMinWidth), llround(mCurHeight) );
 	}
 
 	// move item renamer text field to item's new position
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index f6861d83dee..d5761602779 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -685,7 +685,8 @@ LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool u
 	p.rect = folder_rect;
 	p.parent_panel = this;
 	p.tool_tip = p.name;
-	p.listener =  bridge;
+	p.listener = bridge;
+	p.view_model = new LLFolderViewModelInventory();
 	p.use_label_suffix = useLabelSuffix;
 	p.allow_multiselect = mAllowMultiSelect;
 	p.show_empty_message = mShowEmptyMessage;
-- 
GitLab