summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2011-11-18 20:02:54 +0200
committerPaul ProductEngine <pguslisty@productengine.com>2011-11-18 20:02:54 +0200
commitb79ccf9dd76104d53e4da6845b970bd13717ff8f (patch)
tree2a939b4d14fabc08f2db98c586e47d97c5ef94e1 /indra
parentdf7f4f60b60e7d53060e4d8e3d0ca03bf74bf24e (diff)
EXP-1554 FIXED (Selecting More Info for more than one Classified section in Search floater, breaks the navigation history in Picks Floater)
- For each classified info create a new instance of LLPanelClassifiedInfo - Added destructor for LLPanelProfile::ChildStack to avoid memory leak
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llpanelpicks.cpp11
-rwxr-xr-xindra/newview/llpanelprofile.cpp17
-rwxr-xr-xindra/newview/llpanelprofile.h1
3 files changed, 22 insertions, 7 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 50dc66ed7c..244108162b 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -1048,13 +1048,10 @@ void LLPanelPicks::createPickInfoPanel()
void LLPanelPicks::createClassifiedInfoPanel()
{
- if(!mPanelClassifiedInfo)
- {
- mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
- mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
- mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
- mPanelClassifiedInfo->setVisible(FALSE);
- }
+ mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
+ mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
+ mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
+ mPanelClassifiedInfo->setVisible(FALSE);
}
void LLPanelPicks::createClassifiedEditPanel(LLPanelClassifiedEdit** panel)
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index c237bf1d06..b1eeabb028 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -167,6 +167,23 @@ LLPanelProfile::ChildStack::ChildStack()
{
}
+LLPanelProfile::ChildStack::~ChildStack()
+{
+ while (mStack.size() != 0)
+ {
+ view_list_t& top = mStack.back();
+ for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
+ {
+ LLView* viewp = *it;
+ if (viewp)
+ {
+ delete viewp;
+ }
+ }
+ mStack.pop_back();
+ }
+}
+
void LLPanelProfile::ChildStack::setParent(LLPanel* parent)
{
llassert_always(parent != NULL);
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index bd4457c240..d97f60ed22 100755
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -74,6 +74,7 @@ private:
LOG_CLASS(LLPanelProfile::ChildStack);
public:
ChildStack();
+ ~ChildStack();
void setParent(LLPanel* parent);
bool push();