@@ -1259,10 +1259,10 @@ Boolean MCButton::mdown(uint2 which)
12591259 return True;
12601260}
12611261
1262- Boolean MCButton::mup (uint2 which)
1262+ Boolean MCButton::mup (uint2 which, bool p_release )
12631263{
12641264 if (state & CS_MENU_ATTACHED )
1265- return MCObject::mup (which);
1265+ return MCObject::mup (which, p_release );
12661266 MCAutoStringRef t_pick;
12671267 if (state & CS_SUBMENU
12681268 && (which == 0 || menubutton == 0 || (uint1)which == menubutton))
@@ -1283,14 +1283,14 @@ Boolean MCButton::mup(uint2 which)
12831283 {
12841284 state &= ~CS_FIELD_GRAB ;
12851285 if (state & CS_SUBMENU )
1286- menu->mup (which);
1286+ menu->mup (which, p_release );
12871287 else
1288- entry->mup (which);
1288+ entry->mup (which, p_release );
12891289 return True;
12901290 }
12911291 if (menudepth > mymenudepth)
12921292 {
1293- menu->mup (which);
1293+ menu->mup (which, p_release );
12941294 if (menudepth > mymenudepth)
12951295 return True;
12961296 }
@@ -1415,7 +1415,7 @@ Boolean MCButton::mup(uint2 which)
14151415 if (state & CS_FIELD_GRAB )
14161416 {
14171417 state &= ~CS_FIELD_GRAB ;
1418- entry->mup (which);
1418+ entry->mup (which, p_release );
14191419 }
14201420 else
14211421 {
@@ -1486,7 +1486,7 @@ Boolean MCButton::mup(uint2 which)
14861486 if (state & CS_HILITED )
14871487 radio ();
14881488 }
1489- if (MCU_point_in_rect (rect, mx, my))
1489+ if (!p_release && MCU_point_in_rect (rect, mx, my))
14901490 {
14911491 state |= CS_VISITED ;
14921492 message_with_valueref_args (MCM_mouse_up, MCSTR (" 1" ));
@@ -1497,7 +1497,7 @@ Boolean MCButton::mup(uint2 which)
14971497 break ;
14981498 case T_BUTTON :
14991499 case T_POINTER :
1500- end ();
1500+ end (true , p_release );
15011501 break ;
15021502 case T_HELP :
15031503 help ();
@@ -1509,7 +1509,7 @@ Boolean MCButton::mup(uint2 which)
15091509 }
15101510 else
15111511 {
1512- if (MCU_point_in_rect (rect, mx, my))
1512+ if (!p_release && MCU_point_in_rect (rect, mx, my))
15131513 {
15141514 state |= CS_VISITED ;
15151515 message_with_args (MCM_mouse_up, which);
0 commit comments