changeset 26511:7bf8036ad3f6 stable

Fix error when performing autoscale from Qt figures (bug #54920) * Canvas.cc (autoscale_axes): Clear zoom stack without performing unzoom before.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Wed, 09 Jan 2019 09:05:31 +0100
parents 0fba2d918b65
children 4d6392c879d7
files libgui/graphics/Canvas.cc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc	Tue Jan 08 21:35:17 2019 -0800
+++ b/libgui/graphics/Canvas.cc	Wed Jan 09 09:05:31 2019 +0100
@@ -261,7 +261,10 @@
   static void
   autoscale_axes (axes::properties& ap)
   {
-    ap.clear_zoom_stack ();
+    gh_manager::auto_lock lock;
+
+    // Reset zoom stack
+    ap.clear_zoom_stack (false);
 
     ap.set_xlimmode ("auto");
     ap.set_ylimmode ("auto");