1// ============================================================================= 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3// Copyright (C) 2014 - Scilab Enterprises - Vincent COUVERT 4// 5// This file is distributed under the same license as the Scilab package. 6// ============================================================================= 7 8// <-- INTERACTIVE TEST --> 9// 10// <-- Non-regression test for bug 13185 --> 11// 12// <-- Bugzilla URL --> 13// http://bugzilla.scilab.org/13185 14// 15// <-- Short Description --> 16// When the "checked" option of an uimenu was set to "on" for 17// the first time, the display order of others uimenus was changed. 18 19function f_menu1() 20 obj = findobj("tag", "menu1"); 21 if obj.checked == "on" then 22 obj.checked = "off"; 23 else 24 obj.checked = "on"; 25 end 26endfunction 27 28function f_menu2() 29 obj = findobj("tag", "menu2"); 30 if obj.checked == "on" then 31 obj.checked = "off"; 32 else 33 obj.checked = "on"; 34 end 35endfunction 36 37function f_menu3() 38 obj = findobj("tag", "menu3"); 39 if obj.checked == "on" then 40 obj.checked = "off"; 41 else 42 obj.checked = "on"; 43 end 44endfunction 45 46 47f = gcf() 48main_menu = uimenu(f, "label", "Test") 49menu_1 = uimenu(main_menu, "label", "menu1", "callback", "f_menu1()", "tag", "menu1") 50menu_2 = uimenu(main_menu, "label", "menu2", "callback", "f_menu2()", "tag", "menu2") 51menu_3 = uimenu(main_menu, "label", "menu3", "callback", "f_menu3()", "tag", "menu3") 52 53// First, you click on the first menu: "menu1". The menus list must not change. 54// Idem for "menu2" and "menu3" 55