SL-19649 Adjust other classes for new deleteAllChildren mechanics
parent
17e18aa9bf
commit
6e2e9d5904
|
|
@ -284,6 +284,17 @@ void LLLayoutStack::draw()
|
|||
}
|
||||
}
|
||||
|
||||
void LLLayoutStack::deleteAllChildren()
|
||||
{
|
||||
mPanels.clear();
|
||||
LLView::deleteAllChildren();
|
||||
|
||||
// Not really needed since nothing is left to
|
||||
// display, but for the sake of consistency
|
||||
updateFractionalSizes();
|
||||
mNeedsLayout = true;
|
||||
}
|
||||
|
||||
void LLLayoutStack::removeChild(LLView* view)
|
||||
{
|
||||
LLLayoutPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast<LLPanel*>(view));
|
||||
|
|
@ -291,12 +302,14 @@ void LLLayoutStack::removeChild(LLView* view)
|
|||
if (embedded_panelp)
|
||||
{
|
||||
mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp));
|
||||
delete embedded_panelp;
|
||||
LLView::removeChild(view);
|
||||
updateFractionalSizes();
|
||||
mNeedsLayout = true;
|
||||
}
|
||||
|
||||
LLView::removeChild(view);
|
||||
else
|
||||
{
|
||||
LLView::removeChild(view);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLLayoutStack::postBuild()
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ public:
|
|||
virtual ~LLLayoutStack();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild(LLView*);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool addChild(LLView* child, S32 tab_group = 0);
|
||||
|
|
|
|||
|
|
@ -1891,6 +1891,13 @@ bool LLMenuGL::addContextChild(LLView* view, S32 tab_group)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
void LLMenuGL::deleteAllChildren()
|
||||
{
|
||||
mItems.clear();
|
||||
LLUICtrl::deleteAllChildren();
|
||||
}
|
||||
|
||||
void LLMenuGL::removeChild( LLView* ctrl)
|
||||
{
|
||||
// previously a dynamic_cast with if statement to check validity
|
||||
|
|
|
|||
|
|
@ -449,6 +449,7 @@ public:
|
|||
/*virtual*/ void drawBackground(LLMenuItemGL* itemp, F32 alpha);
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild( LLView* ctrl);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public:
|
|||
|
||||
/*virtual*/ void onOpen(const LLSD& notification_id);
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild(LLView* child);
|
||||
private:
|
||||
void onToastDestroy(LLToast * toast);
|
||||
|
|
@ -122,6 +123,12 @@ BOOL LLInspectToast::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
return LLFloater::handleToolTip(x, y, mask);
|
||||
}
|
||||
|
||||
void LLInspectToast::deleteAllChildren()
|
||||
{
|
||||
mPanel = NULL;
|
||||
LLInspect::deleteAllChildren();
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLInspectToast::removeChild(LLView* child)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -906,7 +906,10 @@ const LLUUID LLInventoryModel::findCategoryUUIDForTypeInRoot(
|
|||
}
|
||||
}
|
||||
|
||||
if(rv.isNull() && root_id.notNull() && preferred_type != LLFolderType::FT_MARKETPLACE_LISTINGS)
|
||||
if(rv.isNull()
|
||||
&& root_id.notNull()
|
||||
&& preferred_type != LLFolderType::FT_MARKETPLACE_LISTINGS
|
||||
&& preferred_type != LLFolderType::FT_OUTBOX)
|
||||
{
|
||||
// if it does not exists, it should either be added
|
||||
// to createCommonSystemCategories or server should
|
||||
|
|
|
|||
|
|
@ -1733,7 +1733,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
|
|||
}
|
||||
|
||||
const LLUUID &outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX);
|
||||
if(gInventory.isObjectDescendentOf(item->getUUID(), outbox_id))
|
||||
if(outbox_id.notNull() && gInventory.isObjectDescendentOf(item->getUUID(), outbox_id))
|
||||
{
|
||||
// Legacy
|
||||
return ACCEPT_NO;
|
||||
|
|
@ -2160,7 +2160,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
|
|||
}
|
||||
|
||||
const LLUUID &outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX);
|
||||
if(gInventory.isObjectDescendentOf(category->getUUID(), outbox_id))
|
||||
if(outbox_id.notNull() && gInventory.isObjectDescendentOf(category->getUUID(), outbox_id))
|
||||
{
|
||||
// Legacy
|
||||
return ACCEPT_NO;
|
||||
|
|
|
|||
Loading…
Reference in New Issue