1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Remove no longer used DISPOSE flag from CIntObject

This commit is contained in:
Ivan Savenko 2024-08-09 15:50:37 +00:00
parent 4ff2894cf2
commit 220c5cb1d7
5 changed files with 2 additions and 12 deletions

View File

@ -37,12 +37,7 @@ CIntObject::~CIntObject()
deactivate();
while(!children.empty())
{
if(children.front()->recActions & DISPOSE)
delete children.front();
else
removeChild(children.front());
}
removeChild(children.front());
if(parent_m)
parent_m->removeChild(this);
@ -111,8 +106,6 @@ void CIntObject::disable()
{
if(isActive())
deactivate();
recActions = DISPOSE;
}
void CIntObject::enable()

View File

@ -73,7 +73,7 @@ public:
void addUsedEvents(ui16 newActions);
void removeUsedEvents(ui16 newActions);
enum {ACTIVATE=1, DEACTIVATE=2, UPDATE=4, SHOWALL=8, DISPOSE=16, SHARE_POS=32, ALL_ACTIONS=255-DISPOSE};
enum {ACTIVATE=1, DEACTIVATE=2, UPDATE=4, SHOWALL=8, SHARE_POS=16, ALL_ACTIONS=31};
ui8 recActions; //which calls we allow to receive from parent
/// deactivates if needed, blocks all automatic activity, allows only disposal

View File

@ -108,7 +108,6 @@ void CSelectionBase::toggleTab(std::shared_ptr<CIntObject> tab)
if(curTab != tab)
{
tab->recActions = 255 - DISPOSE;
tab->activate();
curTab = tab;
}

View File

@ -534,7 +534,6 @@ bool CGarrisonSlot::handleSplittingShortcuts()
void CGarrisonInt::addSplitBtn(std::shared_ptr<CButton> button)
{
addChild(button.get());
button->recActions &= ~DISPOSE;
splitButtons.push_back(button);
button->block(getSelection() == nullptr);
}

View File

@ -1521,7 +1521,6 @@ void CObjectListWindow::init(std::shared_ptr<CIntObject> titleWidget_, std::stri
if(titleWidget)
{
addChild(titleWidget.get());
titleWidget->recActions = 255-DISPOSE;
titleWidget->pos.x = pos.w/2 + pos.x - titleWidget->pos.w/2;
titleWidget->pos.y =75 + pos.y - titleWidget->pos.h/2;
}