@@ -3151,17 +3151,11 @@ void MCObject::Set3D(MCExecContext& ctxt, bool setting)
31513151
31523152// //////////////////////////////////////////////////////////////////////////////
31533153
3154- void MCObject::SetVisibility (MCExecContext& ctxt, uint32_t part, bool setting, bool visible )
3154+ void MCObject::SetVisible (MCExecContext& ctxt, uint32_t part, bool setting)
31553155{
31563156 bool dirty;
31573157 dirty = changeflag (setting, F_VISIBLE);
31583158
3159- if (!visible)
3160- {
3161- flags ^= F_VISIBLE;
3162- dirty = !dirty;
3163- }
3164-
31653159 // MW-2011-10-17: [[ Bug 9813 ]] Record the current effective rect of the object.
31663160 MCRectangle t_old_effective_rect;
31673161 if (dirty && opened && gettype () >= CT_GROUP)
@@ -3188,42 +3182,27 @@ void MCObject::SetVisibility(MCExecContext& ctxt, uint32_t part, bool setting, b
31883182
31893183void MCObject::GetVisible (MCExecContext& ctxt, uint32_t part, bool & r_setting)
31903184{
3191- r_setting = getflag (F_VISIBLE);
3192- }
3193-
3194- void MCObject::SetVisible (MCExecContext& ctxt, uint32_t part, bool setting)
3195- {
3196- SetVisibility (ctxt, part, setting, true );
3185+ r_setting = isvisible (false );
31973186}
31983187
31993188void MCObject::GetEffectiveVisible (MCExecContext& ctxt, uint32_t part, bool & r_setting)
32003189{
3201- bool t_vis;
3202- t_vis = getflag (F_VISIBLE);
3203-
3204- // if visible and effective and parent is a
3205- // group then keep searching parent properties
3206- if (t_vis && parent != NULL && parent->gettype () == CT_GROUP)
3207- parent->GetEffectiveVisible (ctxt, part, t_vis);
3208-
3209- r_setting = t_vis;
3190+ r_setting = isvisible (true );
32103191}
32113192
32123193void MCObject::GetInvisible (MCExecContext& ctxt, uint32_t part, bool & r_setting)
32133194{
3214- r_setting = (flags & F_VISIBLE) == False ;
3195+ r_setting = ! isvisible ( false ) ;
32153196}
32163197
32173198void MCObject::SetInvisible (MCExecContext& ctxt, uint32_t part, bool setting)
32183199{
3219- SetVisibility (ctxt, part, setting, false );
3200+ SetVisible (ctxt, part, ! setting);
32203201}
32213202
32223203void MCObject::GetEffectiveInvisible (MCExecContext& ctxt, uint32_t part, bool & r_setting)
32233204{
3224- bool t_setting;
3225- GetEffectiveVisible (ctxt, part, t_setting);
3226- r_setting = !t_setting;
3205+ r_setting = !isvisible (true );
32273206}
32283207
32293208void MCObject::GetEnabled (MCExecContext& ctxt, uint32_t part, bool & r_setting)
0 commit comments