@@ -994,18 +994,22 @@ void MCCard::timer(MCNameRef mptr, MCParameter *params)
994994 if (mfocused == NULL && MCbuttonstate)
995995 {
996996 if (tool == T_BROWSE)
997+ {
997998 if (message (MCM_mouse_still_down) == ES_ERROR)
998999 senderror ();
9991000 else
10001001 again = True;
1002+ }
10011003 }
10021004 if (hashandlers & HH_IDLE)
10031005 {
10041006 if (tool == T_BROWSE)
1007+ {
10051008 if (message (MCM_idle) == ES_ERROR)
10061009 senderror ();
10071010 else
10081011 again = True;
1012+ }
10091013 }
10101014 if (again)
10111015 MCscreen->addtimer (this , MCM_idle, MCidleRate);
@@ -1813,7 +1817,7 @@ void MCCard::relayercontrol_insert(MCControl *p_control, MCControl *p_target)
18131817
18141818Exec_stat MCCard::relayer (MCControl *optr, uint2 newlayer)
18151819{
1816- if (!opened || !MCrelayergrouped && optr->getparent ()->gettype () == CT_GROUP || (optr -> getparent () -> gettype () == CT_CARD && optr -> getparent () != this ))
1820+ if (!opened || ( !MCrelayergrouped && optr->getparent ()->gettype () == CT_GROUP) || (optr -> getparent () -> gettype () == CT_CARD && optr -> getparent () != this ))
18171821 return ES_ERROR;
18181822 uint2 oldlayer = 0 ;
18191823 if (!MCrelayergrouped)
@@ -1963,7 +1967,7 @@ MCCard *MCCard::findname(Chunk_term type, MCNameRef inname)
19631967
19641968MCCard *MCCard::findid (Chunk_term type, uint4 inid, Boolean alt)
19651969{
1966- if (type == CT_CARD && (inid == obj_id || alt && inid == altid))
1970+ if (type == CT_CARD && (inid == obj_id || ( alt && inid == altid) ))
19671971 return this ;
19681972 else
19691973 return NULL ;
@@ -2007,9 +2011,9 @@ Boolean MCCard::count(Chunk_term otype, Chunk_term ptype,
20072011
20082012 // MW-2011-08-08: [[ Groups ]] Use 'isbackground()' rather than !F_GROUP_ONLY.
20092013 if (ptype == CT_UNDEFINED
2010- || otype == CT_GROUP && ttype == CT_GROUP
2011- || ptype != CT_BACKGROUND && ttype != CT_GROUP
2012- || (ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground ())
2014+ || ( otype == CT_GROUP && ttype == CT_GROUP)
2015+ || ( ptype != CT_BACKGROUND && ttype != CT_GROUP)
2016+ || (( ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground () ))
20132017 if (optr->getref ()->count (otype, stop, num))
20142018 {
20152019 if (!opened)
@@ -2052,9 +2056,9 @@ MCControl *MCCard::getnumberedchild(integer_t p_number, Chunk_term p_obj_type, C
20522056
20532057 // MW-2011-08-08: [[ Groups ]] Use 'isbackground()' rather than !F_GROUP_ONLY.
20542058 if (p_parent_type == CT_UNDEFINED
2055- || p_obj_type == CT_GROUP && t_type == CT_GROUP
2056- || p_parent_type != CT_BACKGROUND && t_type != CT_GROUP
2057- || (t_type == CT_GROUP && p_parent_type == CT_BACKGROUND) == static_cast <MCGroup *>(t_optr->getref ())->isbackground ())
2059+ || ( p_obj_type == CT_GROUP && t_type == CT_GROUP)
2060+ || ( p_parent_type != CT_BACKGROUND && t_type != CT_GROUP)
2061+ || (( t_type == CT_GROUP && p_parent_type == CT_BACKGROUND) == static_cast <MCGroup *>(t_optr->getref ())->isbackground () ))
20582062 {
20592063 if (!t_optr->getref ()->getopened ())
20602064 t_optr->getref ()->setparent (this );
@@ -2146,11 +2150,11 @@ MCControl *MCCard::getchild(Chunk_term etype, MCStringRef p_expression,
21462150 {
21472151 Chunk_term ttype = optr->getref ()->gettype ();
21482152 if (ptype == CT_UNDEFINED
2149- || otype == CT_GROUP && ttype == CT_GROUP
2150- || ptype != CT_BACKGROUND && ttype != CT_GROUP
2151- || (ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground ())
2153+ || ( otype == CT_GROUP && ttype == CT_GROUP)
2154+ || ( ptype != CT_BACKGROUND && ttype != CT_GROUP)
2155+ || (( ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground () ))
21522156 {
2153- if (otype == CT_LAYER && t_object -> gettype () > CT_CARD || t_object -> gettype () == otype)
2157+ if (( otype == CT_LAYER && t_object -> gettype () > CT_CARD) || t_object -> gettype () == otype)
21542158 return (MCControl *)t_object;
21552159 }
21562160 }
@@ -2163,9 +2167,9 @@ MCControl *MCCard::getchild(Chunk_term etype, MCStringRef p_expression,
21632167
21642168 // MW-2011-08-08: [[ Groups ]] Use 'isbackground()' rather than !F_GROUP_ONLY.
21652169 if (ptype == CT_UNDEFINED
2166- || otype == CT_GROUP && ttype == CT_GROUP
2167- || ptype != CT_BACKGROUND && ttype != CT_GROUP
2168- || (ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground ())
2170+ || ( otype == CT_GROUP && ttype == CT_GROUP)
2171+ || ( ptype != CT_BACKGROUND && ttype != CT_GROUP)
2172+ || (( ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground () ))
21692173 {
21702174 if (!optr->getref ()->getopened ())
21712175 optr->getref ()->setparent (this );
@@ -2205,9 +2209,9 @@ MCControl *MCCard::getchild(Chunk_term etype, MCStringRef p_expression,
22052209
22062210 // MW-2011-08-08: [[ Groups ]] Use 'isbackground()' rather than !F_GROUP_ONLY.
22072211 if (ptype == CT_UNDEFINED
2208- || otype == CT_GROUP && ttype == CT_GROUP
2209- || ptype != CT_BACKGROUND && ttype != CT_GROUP
2210- || (ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground ())
2212+ || ( otype == CT_GROUP && ttype == CT_GROUP)
2213+ || ( ptype != CT_BACKGROUND && ttype != CT_GROUP)
2214+ || (( ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground () ))
22112215 foundobj = optr->getref ()->findid (otype, tofindid, True);
22122216 if (foundobj != NULL )
22132217 {
@@ -2236,9 +2240,9 @@ MCControl *MCCard::getchild(Chunk_term etype, MCStringRef p_expression,
22362240 Chunk_term ttype = optr->getref ()->gettype ();
22372241 // MW-2011-08-08: [[ Groups ]] Use 'isbackground()' rather than !F_GROUP_ONLY.
22382242 if (ptype == CT_UNDEFINED
2239- || otype == CT_GROUP && ttype == CT_GROUP
2240- || ptype != CT_BACKGROUND && ttype != CT_GROUP
2241- || (ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground ())
2243+ || ( otype == CT_GROUP && ttype == CT_GROUP)
2244+ || ( ptype != CT_BACKGROUND && ttype != CT_GROUP)
2245+ || (( ttype == CT_GROUP && ptype == CT_BACKGROUND) == static_cast <MCGroup *>(optr->getref ())->isbackground () ))
22422246 {
22432247 if (!optr->getref ()->getopened ())
22442248 optr->getref ()->setparent (this );
@@ -3085,10 +3089,12 @@ MCRectangle MCCard::computecrect()
30853089 do
30863090 {
30873091 if (optr->getref ()->isvisible ())
3092+ {
30883093 if (minrect.width == 0 )
30893094 minrect = optr->getref ()->getrect ();
30903095 else
30913096 minrect = MCU_union_rect (optr->getref ()->getrect (), minrect);
3097+ }
30923098 optr = optr->next ();
30933099 }
30943100 while (optr != objptrs);
0 commit comments