changeset 19712:c17e1cefdbd3

Fix reordering graphics property children for hidden objects (bug #44211) * graphics.in.h (children_property::do_set): check if children also list contains hidden chidren.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 08 Feb 2015 18:40:00 +0100
parents 0f557da98f5b
children f1270e5a3117
files libinterp/corefcn/graphics.in.h
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h	Sun Feb 08 01:09:32 2015 -0500
+++ b/libinterp/corefcn/graphics.in.h	Sun Feb 08 18:40:00 2015 +0100
@@ -1716,6 +1716,7 @@
     const Matrix new_kids_column = new_kids.reshape (dim_vector (nel, 1));
 
     bool is_ok = true;
+    bool add_hidden = true;
 
     if (! error_state)
       {
@@ -1725,9 +1726,13 @@
           {
             Matrix t1 = visible_kids.sort ();
             Matrix t2 = new_kids_column.sort ();
+            Matrix t3 = get_hidden ().sort ();
 
             if (t1 != t2)
               is_ok = false;
+            
+            if (t1 == t3)
+              add_hidden = false;
           }
         else
           is_ok = false;
@@ -1743,7 +1748,10 @@
 
     if (is_ok)
       {
-        Matrix tmp = new_kids_column.stack (get_hidden ());
+        Matrix tmp = new_kids_column;
+
+        if (add_hidden)
+          tmp.stack (get_hidden ());
 
         children_list.clear ();