Skip to content

Commit 3316201

Browse files
[[ Bug 13100 ]] Added few forgotten flag setting (which was causing 'Development->Test' to be displayed as 'Development->Simulate')
1 parent c49d9e6 commit 3316201

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

engine/src/button.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,6 +3444,7 @@ class ButtonMenuCallback : public IParseMenuCallback
34443444
if (width > bstack[stackdepth].maxwidth)
34453445
bstack[stackdepth].maxwidth = width;
34463446
MCValueAssign(newbutton->label, p_menuitem->label);
3447+
newbutton -> flags |= F_LABEL;
34473448
}
34483449
return false;
34493450
}
@@ -3609,6 +3610,7 @@ void MCButton::openmenu(Boolean grab)
36093610
MCRangeMake(t_offset, t_new_offset - t_offset),
36103611
&t_label);
36113612
MCValueAssign(label, *t_label);
3613+
flags |= F_LABEL;
36123614
message_with_valueref_args(MCM_menu_pick, *t_label);
36133615
}
36143616
return;

engine/src/exec-interface-group.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ void MCGroup::GetLabel(MCExecContext& ctxt, MCStringRef& r_label)
290290
void MCGroup::SetLabel(MCExecContext& ctxt, MCStringRef p_label)
291291
{
292292
MCValueAssign(label, p_label);
293+
flags |= F_LABEL;
293294
Redraw();
294295
}
295296

engine/src/group.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3128,12 +3128,6 @@ IO_stat MCGroup::save(IO_handle stream, uint4 p_part, bool p_force_ext)
31283128
{
31293129
IO_stat stat;
31303130

3131-
// Update the "has label" flag
3132-
if (!MCStringIsEmpty(label))
3133-
flags |= F_LABEL;
3134-
else
3135-
flags &= ~F_LABEL;
3136-
31373131
if ((stat = IO_write_uint1(OT_GROUP, stream)) != IO_NORMAL)
31383132
return stat;
31393133

0 commit comments

Comments
 (0)