changeset 33594:2104a33b7e83

maint: merge stable to default
author Rik <rik@octave.org>
date Fri, 17 May 2024 13:44:02 -0700
parents d26bc20bac10 (current diff) ca958ca8c921 (diff)
children e8e951bcf701
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Fri May 17 15:04:11 2024 +0200
+++ b/libinterp/corefcn/graphics.cc	Fri May 17 13:44:02 2024 -0700
@@ -4932,9 +4932,11 @@
 
   plist.erase ("units");
   plist.erase ("position");
+  plist.erase ("innerposition");
   plist.erase ("outerposition");
   plist.erase ("paperunits");
   plist.erase ("paperposition");
+  plist.erase ("paperpositionmode");
   plist.erase ("windowstyle");
 
   remove_all_listeners ();
@@ -12335,15 +12337,23 @@
 %!   close (hf);
 %! end_unwind_protect
 
-%!test  # root object
+%!test  # figure object
 %! set (0, "defaultfigurevisible", "off");
-%! hf = figure ("visible", "off", "paperunits", "centimeters",
-%!              "papertype", "a4");
+%! hf = figure ("visible", "off",
+%!              "units", "normalized",
+%!              "position", [0, 0, pi/10, e/10],
+%!              "paperunits", "normalized",
+%!              "paperposition", [0.1, 0.1, 0.9, 0.9],
+%!              "tag", "foobar");
 %! unwind_protect
 %!   reset (hf);
-%!   assert (get (hf, "papertype"), get (0, "defaultfigurepapertype"));
-%!   assert (get (hf, "paperunits"), "centimeters");  # paperunits is unchanged
-%!   assert (get (hf, "visible"), get (0, "defaultfigurevisible"));
+%!   ## Ordinary property is reset
+%!   assert (get (hf, "tag"), "");
+%!   ## Following 4 special properties are not reset
+%!   assert (get (hf, "units"), "normalized");
+%!   assert (get (hf, "position"), [0, 0, pi/10, e/10]);
+%!   assert (get (hf, "paperunits"), "normalized");
+%!   assert (get (hf, "paperposition"), [0.1, 0.1, 0.9, 0.9]);
 %! unwind_protect_cleanup
 %!   close (hf);
 %!   set (0, "defaultfigurevisible", "remove");