Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit cca58bf

Browse files
committed
Merge remote-tracking branch 'upstream/develop-8.1' into merge-develop-8.1_18.01.2017
2 parents c3bd7d7 + 79fdf26 commit cca58bf

File tree

18 files changed

+80
-53
lines changed

18 files changed

+80
-53
lines changed

docs/notes/bugfix-17973.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Make sure `the machine` can distinguish between iOS device and simulator

docs/notes/bugfix-18459.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix incorrect behavior of files() and folders() function on Android.

docs/notes/bugfix-18977.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure setting the card triggers openCard / closeCard in no UI mode

docs/notes/bugfix-19032.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Prevent crash when creating and deleting two data grids

docs/notes/bugfix-19050.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[[ Bug 19050 ]] CGI does not work with lighttpd 1.4.44
1+
# CGI does not work with lighttpd 1.4.44

docs/notes/bugfix-19088.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Do not show "Success" dialog if an error occurred in S/B

engine/src/card.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,7 @@ Boolean MCCard::del(bool p_check_flag)
11581158
}
11591159
else
11601160
{
1161+
optr->getref()->uncacheid();
11611162
getstack()->removecontrol(optr->getref());
11621163
}
11631164
MCCdata *dptr = optr->getref()->getdata(obj_id, False);
@@ -1168,6 +1169,8 @@ Boolean MCCard::del(bool p_check_flag)
11681169
while (optr != objptrs);
11691170
}
11701171

1172+
uncacheid();
1173+
11711174
// MCObject now does things on del(), so we must make sure we finish by
11721175
// calling its implementation.
11731176
return MCObject::del(p_check_flag);

engine/src/control.cpp

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -497,29 +497,27 @@ Boolean MCControl::del(bool p_check_flag)
497497
if (getselected())
498498
getcard()->dirtyselection(rect);
499499

500-
uint2 num = 0;
501-
getcard()->count(CT_LAYER, CT_UNDEFINED, this, num, True);
502500
switch (parent->gettype())
503501
{
504-
case CT_CARD:
505-
{
506-
MCCard *cptr = parent.GetAs<MCCard>();
507-
if (!cptr->removecontrol(this, False, True))
502+
case CT_STACK:
503+
uncacheid();
504+
parent.GetAs<MCStack>()->removecontrol(this);
505+
break;
506+
507+
case CT_CARD:
508+
if (!parent.GetAs<MCCard>()->removecontrol(this, False, True))
508509
return False;
510+
uncacheid();
509511
getstack()->removecontrol(this);
510512
break;
511-
}
512-
case CT_GROUP:
513-
{
514-
MCGroup *gptr = parent.GetAs<MCGroup>();
515-
gptr->removecontrol(this, True);
513+
514+
case CT_GROUP:
515+
parent.GetAs<MCGroup>()->removecontrol(this, True);
516+
uncacheid();
516517
break;
517-
}
518-
default:
519-
{ //stack
520-
MCStack *sptr = parent.GetAs<MCStack>();
521-
sptr->removecontrol(this);
522-
}
518+
519+
default:
520+
MCUnreachable();
523521
}
524522

525523
// IM-2012-05-16 [[ BZ 10212 ]] deleting the dragtarget control in response

engine/src/group.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,22 @@ void MCGroup::applyrect(const MCRectangle &nrect)
10311031
}
10321032
}
10331033

1034+
void MCGroup::uncacheid()
1035+
{
1036+
if (controls != NULL)
1037+
{
1038+
MCControl *t_control;
1039+
t_control = controls;
1040+
do
1041+
{ t_control -> uncacheid();
1042+
t_control = t_control -> next();
1043+
}
1044+
while(t_control != controls);
1045+
}
1046+
1047+
MCObject::uncacheid();
1048+
}
1049+
10341050
bool MCGroup::isdeletable(bool p_check_flag)
10351051
{
10361052
if (!parent || scriptdepth != 0 ||
@@ -1063,7 +1079,6 @@ Boolean MCGroup::del(bool p_check_flag)
10631079
if (!isdeletable(p_check_flag))
10641080
return False;
10651081

1066-
rect = getcard()->getrect();
10671082
return MCControl::del(p_check_flag);
10681083
}
10691084

engine/src/group.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class MCGroup : public MCControl, public MCMixinObjectHandle<MCGroup>
9292
virtual Boolean doubleup(uint2 which);
9393
virtual void applyrect(const MCRectangle &nrect);
9494

95-
95+
virtual void uncacheid(void);
9696
virtual Boolean del(bool p_check_flag);
9797
virtual void recompute();
9898

0 commit comments

Comments
 (0)