changeset 26984:232102b1e920 stable

eliminate duplicate graphics callback object stack (bug #55908) * graphics.cc (root_figure::properties::set_callbackobj): Don't use cbo_stack.
author John W. Eaton <jwe@octave.org>
date Tue, 26 Mar 2019 04:12:23 +0000
parents 8d7265e353a0
children 87c5b3ba4664 16d4e3d14213
files libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h
diffstat 2 files changed, 5 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Sat Mar 16 22:21:26 2019 +0100
+++ b/libinterp/corefcn/graphics.cc	Tue Mar 26 04:12:23 2019 +0000
@@ -3751,23 +3751,9 @@
   graphics_handle val (v);
 
   if (octave::math::isnan (val.value ()))
-    {
-      if (! cbo_stack.empty ())
-        {
-          val = cbo_stack.front ();
-
-          cbo_stack.pop_front ();
-        }
-
-      callbackobject = val;
-    }
+    callbackobject = graphics_handle ();
   else if (ishghandle (val))
-    {
-      if (get_callbackobject ().ok ())
-        cbo_stack.push_front (get_callbackobject ());
-
-      callbackobject = val;
-    }
+    callbackobject = val;
   else
     err_set_invalid ("callbackobject");
 }
--- a/libinterp/corefcn/graphics.in.h	Sat Mar 16 22:21:26 2019 +0100
+++ b/libinterp/corefcn/graphics.in.h	Tue Mar 26 04:12:23 2019 +0000
@@ -2960,8 +2960,10 @@
     END_PROPERTIES
 
   private:
+
+    // Even though this data member is now unused, keep it for now to
+    // ensure backward compatibility.  It will be removed in version 6.
     std::list<graphics_handle> cbo_stack;
-
   };
 
 private: