pushing what I have for tonight
This commit is contained in:
@@ -56,6 +56,10 @@
|
||||
#include "lltexteditor.h"
|
||||
#include "lltextbox.h"
|
||||
|
||||
// <edit>
|
||||
#include "lldelayeduidelete.h"
|
||||
// </edit>
|
||||
|
||||
//HACK: this allows you to instantiate LLView from xml with "<view/>" which we don't want
|
||||
static LLRegisterWidget<LLView> r("view");
|
||||
|
||||
@@ -87,7 +91,10 @@ LLView::LLView() :
|
||||
mUseBoundingRect(FALSE),
|
||||
mVisible(TRUE),
|
||||
mNextInsertionOrdinal(0),
|
||||
mHoverCursor(UI_CURSOR_ARROW)
|
||||
mHoverCursor(UI_CURSOR_ARROW),
|
||||
// <edit>
|
||||
mDelayedDelete(FALSE)
|
||||
// </edit>
|
||||
{
|
||||
}
|
||||
|
||||
@@ -105,7 +112,10 @@ LLView::LLView(const std::string& name, BOOL mouse_opaque) :
|
||||
mUseBoundingRect(FALSE),
|
||||
mVisible(TRUE),
|
||||
mNextInsertionOrdinal(0),
|
||||
mHoverCursor(UI_CURSOR_ARROW)
|
||||
mHoverCursor(UI_CURSOR_ARROW),
|
||||
// <edit>
|
||||
mDelayedDelete(FALSE)
|
||||
// </edit>
|
||||
{
|
||||
}
|
||||
|
||||
@@ -127,7 +137,10 @@ LLView::LLView(
|
||||
mUseBoundingRect(FALSE),
|
||||
mVisible(TRUE),
|
||||
mNextInsertionOrdinal(0),
|
||||
mHoverCursor(UI_CURSOR_ARROW)
|
||||
mHoverCursor(UI_CURSOR_ARROW),
|
||||
// <edit>
|
||||
mDelayedDelete(FALSE)
|
||||
// </edit>
|
||||
{
|
||||
}
|
||||
|
||||
@@ -143,7 +156,10 @@ LLView::~LLView()
|
||||
gFocusMgr.removeMouseCaptureWithoutCallback( this );
|
||||
}
|
||||
|
||||
deleteAllChildren();
|
||||
// <edit> TESTZONE DERF
|
||||
//deleteAllChildren();
|
||||
deleteAllChildren(mDelayedDelete);
|
||||
// </edit>
|
||||
|
||||
if (mParentView != NULL)
|
||||
{
|
||||
@@ -575,8 +591,26 @@ BOOL LLView::focusPrev(LLView::child_list_t & result)
|
||||
// delete all children. Override this function if you need to
|
||||
// perform any extra clean up such as cached pointers to selected
|
||||
// children, etc.
|
||||
void LLView::deleteAllChildren()
|
||||
// <edit>
|
||||
//void LLView::deleteAllChildren()
|
||||
void LLView::deleteAllChildren(BOOL delay_delete)
|
||||
// </edit>
|
||||
{
|
||||
// <edit> TESTZONE DERF
|
||||
if(delay_delete)
|
||||
{
|
||||
child_list_t::iterator end = mChildList.end();
|
||||
for(child_list_t::iterator iter = mChildList.begin(); iter != end; ++iter)
|
||||
{
|
||||
if((*iter)->getParent() == this)
|
||||
(*iter)->mParentView = NULL;
|
||||
}
|
||||
mCtrlOrder.clear();
|
||||
std::list<LLView*> children(mChildList);
|
||||
gDeleteScheduler->addViewDeleteJob(children);
|
||||
return;
|
||||
}
|
||||
// </edit>
|
||||
// clear out the control ordering
|
||||
mCtrlOrder.clear();
|
||||
|
||||
|
||||
@@ -331,7 +331,10 @@ public:
|
||||
// delete all children. Override this function if you need to
|
||||
// perform any extra clean up such as cached pointers to selected
|
||||
// children, etc.
|
||||
virtual void deleteAllChildren();
|
||||
// <edit>
|
||||
//virtual void deleteAllChildren();
|
||||
virtual void deleteAllChildren(BOOL delay_delete = FALSE);
|
||||
// </edit>
|
||||
|
||||
virtual void setTentative(BOOL b);
|
||||
virtual BOOL getTentative() const;
|
||||
@@ -653,6 +656,12 @@ private:
|
||||
|
||||
S32 mNextInsertionOrdinal;
|
||||
|
||||
// <edit>
|
||||
public:
|
||||
BOOL mDelayedDelete;
|
||||
// </edit>
|
||||
private:
|
||||
|
||||
static LLWindow* sWindow; // All root views must know about their window.
|
||||
|
||||
typedef std::map<std::string, LLPointer<LLSimpleListener> > dispatch_list_t;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1622,6 +1622,9 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
|
||||
|
||||
if (itemp)
|
||||
{
|
||||
// <edit>
|
||||
itemp->mDelayedDelete = TRUE;
|
||||
// </edit>
|
||||
if (parent_folder)
|
||||
{
|
||||
itemp->addToFolder(parent_folder, mFolders);
|
||||
|
||||
@@ -79,9 +79,10 @@ public:
|
||||
BOOL allow_multi_select,
|
||||
LLView *parent_view = NULL);
|
||||
~LLInventoryPanel();
|
||||
// <edit>
|
||||
static std::list<LLInventoryPanel*> sInstances;
|
||||
// </edit>
|
||||
|
||||
// <edit>
|
||||
static std::list<LLInventoryPanel*> sInstances;
|
||||
// </edit>
|
||||
|
||||
LLInventoryModel* getModel() { return mInventory; }
|
||||
|
||||
@@ -141,9 +142,9 @@ protected:
|
||||
// Given the id and the parent, build all of the folder views.
|
||||
void rebuildViewsFor(const LLUUID& id, U32 mask);
|
||||
void buildNewViews(const LLUUID& id);
|
||||
// <edit>
|
||||
void buildNewViews(const LLInventoryObject* objectp);
|
||||
// </edit>
|
||||
// <edit>
|
||||
void buildNewViews(const LLInventoryObject* objectp);
|
||||
// </edit>
|
||||
|
||||
public:
|
||||
// TomY TODO: Move this elsewhere?
|
||||
|
||||
Reference in New Issue
Block a user