changeset 26312:dacba8a503d8 stable

Improve performance of re-parenting hggroups. * graphics.cc (hggroup::update_axis_limits (string, graphics_handle): Resize "limits" to 1x4 vector, not 4x1. Get handle to hggroup and call update_axis_limits with this handle so that the update starts higher up the tree with hggroup rather than the child of the hggroup. * graphics.cc (hggroup::update_axis_limits (string): Resize "limits" to 1x4 vector, not 4x1.
author Rik <rik@octave.org>
date Thu, 27 Dec 2018 16:10:42 -0800
parents 3592ad04b0c6
children 442632888649 f6c466eafc5d
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Thu Dec 27 15:38:42 2018 -0800
+++ b/libinterp/corefcn/graphics.cc	Thu Dec 27 16:10:42 2018 -0800
@@ -10219,7 +10219,7 @@
     }
   else
     {
-      limits.resize (4, 1);
+      limits.resize (1, 4);
       limits(0) = min_val;
       limits(1) = max_val;
       limits(2) = min_pos;
@@ -10267,7 +10267,8 @@
           break;
         }
 
-      base_graphics_object::update_axis_limits (axis_type, h);
+      graphics_handle hg = xproperties.get___myhandle__ ();
+      base_graphics_object::update_axis_limits (axis_type, hg);
     }
 }
 
@@ -10322,7 +10323,7 @@
 
   updating_hggroup_limits = true;
 
-  Matrix limits (1, 4, 0.0);
+  Matrix limits (1, 4);
 
   limits(0) = min_val;
   limits(1) = max_val;