changeset 2370:95c082557ffd

Fix #1942 Box layer not always inheriting the right unit
author Chris Cannam
date Tue, 15 Oct 2019 11:47:01 +0100
parents d96816b824c2
children 2569d6f2095f
files main/MainWindow.cpp repoint-lock.json
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Tue Oct 15 09:32:46 2019 +0100
+++ b/main/MainWindow.cpp	Tue Oct 15 11:47:01 2019 +0100
@@ -4068,11 +4068,11 @@
 
         if (isNewEmptyLayer) {
 
-            double vmin, vmax, dmin, dmax;
+            double min, max;
+            bool log;
             QString unit;
-            if (pane->getTopLayerDisplayExtents
-                (vmin, vmax, dmin, dmax, &unit)) {
-                newLayer->adoptExtents(vmin, vmax, unit);
+            if (pane->getVisibleExtentsForAnyUnit(min, max, log, unit)) {
+                newLayer->adoptExtents(min, max, unit);
             }
             
             for (auto &a : m_toolActions) {
--- a/repoint-lock.json	Tue Oct 15 09:32:46 2019 +0100
+++ b/repoint-lock.json	Tue Oct 15 11:47:01 2019 +0100
@@ -7,7 +7,7 @@
       "pin": "343ef2a866a4"
     },
     "svgui": {
-      "pin": "5a215033b853"
+      "pin": "4f8c72adbf43"
     },
     "svapp": {
       "pin": "ce698f8d0831"