diff libinterp/corefcn/graphics.in.h @ 24395:41cf6ee90cb6

Better handling of "handlevisibility" property (bug #52621). * graphics.in.h (base_property::handlevisibility): Declare virtual updater (figure::properties::update_handlevisibility): Declare overloaded method. * graphics.cc (base_properties::update_handlevisibility): Don't let objects with "handlevisibility" = "off" be the root callbaackobject or figure currentobject. Add BIST for handlevisibility property. (figure::properties::update_handlevisibility): Don't let figure with "handlevisibility" = "off" be the root currentfigure. (axes::properties::update_handlevisibility): Don't let axes with "handlevisibility" = "off" be the figure currentaxes. * figure.m: Don't let figure become "currentfigure" if its handle is not visible.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 10 Dec 2017 14:35:06 +0100
parents ca03c9f3fa4b
children 0c69f0335e1a
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h	Mon Dec 11 08:51:12 2017 -0800
+++ b/libinterp/corefcn/graphics.in.h	Sun Dec 10 14:35:06 2017 +0100
@@ -2362,7 +2362,7 @@
     bool_property clipping , "on"
     callback_property createfcn , Matrix ()
     callback_property deletefcn , Matrix ()
-    radio_property handlevisibility , "{on}|callback|off"
+    radio_property handlevisibility u , "{on}|callback|off"
     bool_property hittest , "on"
     bool_property interruptible , "on"
     handle_property parent fs , p
@@ -2378,6 +2378,8 @@
     graphics_handle __myhandle__ fhrs , mh
   END_PROPERTIES
 
+    virtual void update_handlevisibility (void);
+
 protected:
   struct cmp_caseless_str
   {
@@ -3202,6 +3204,8 @@
         paperposition.set (get_auto_paperposition ());
     }
 
+    void update_handlevisibility (void);
+
     mutable graphics_toolkit toolkit;
   };
 
@@ -3499,6 +3503,7 @@
                       bool push_to_zoom_stack = true);
 
     void unzoom (void);
+    void update_handlevisibility (void);
     void push_zoom_stack (void);
     void clear_zoom_stack (bool do_unzoom = true);