Do not recreate default axes on deletion.
[scilab.git] / scilab / modules / gui / tests / unit_tests / figure.dia.ref
index fa600d9..7f5cb10 100644 (file)
@@ -33,3 +33,28 @@ assert_checkequal(a.filled, "off");
 assert_checkequal(size(f.color_map), [34, 3]);
 assert_checkequal(f.color_map(34,:), [0.5 0.2 0.6]);
 delete(f);
+// Figure without axes
+f = figure("default_axes", "off");
+assert_checkequal(f.children, []);
+newaxes(f);
+assert_checkequal(f.children(1).type, "Axes");
+delete(f.children(1));
+assert_checkequal(f.children, []);
+delete(f);
+// Figure with axes
+f = figure();
+assert_checkequal(f.children(1).type, "Axes");
+delete(f.children(1));
+assert_checkequal(f.children(1).type, "Axes");
+f.default_axes = "off";
+delete(f.children(1));
+assert_checkequal(f.children, []);
+newaxes(f);
+assert_checkequal(f.children(1).type, "Axes");
+delete(f.children(1));
+assert_checkequal(f.children, []);
+f.default_axes = "on";
+newaxes(f);
+assert_checkequal(f.children(1).type, "Axes");
+delete(f.children(1));
+assert_checkequal(f.children(1).type, "Axes");