]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/function/ShowThreeDFunction.java
Version 17, September 2014
[GpsPrune.git] / tim / prune / function / ShowThreeDFunction.java
index bbe771988fd640ee673a81b28f8d04c16cc95191..c2e285b3fc2839cecbfc38debacb880817631dce 100644 (file)
@@ -57,7 +57,7 @@ public class ShowThreeDFunction extends GenericFunction
        }
 
        /**
-        * Show the help screen
+        * Begin the function
         */
        public void begin()
        {
@@ -156,8 +156,12 @@ public class ShowThreeDFunction extends GenericFunction
         */
        private void finish()
        {
-               // Store exaggeration factor in config
+               // Store exaggeration factor and grid size in config
                Config.setConfigInt(Config.KEY_HEIGHT_EXAGGERATION, (int) (_exaggField.getValue() * 100));
+               int terrainGridSize = _terrainPanel.getGridSize();
+               if (terrainGridSize < 20) {terrainGridSize = 20;}
+               Config.setConfigInt(Config.KEY_TERRAIN_GRID_SIZE, terrainGridSize);
+
                ThreeDWindow window = WindowFactory.getWindow(_parentFrame);
                if (window != null)
                {
@@ -169,6 +173,7 @@ public class ShowThreeDFunction extends GenericFunction
                                // Also pass the base image parameters from input dialog
                                window.setBaseImageParameters(_baseImagePanel.getImageDefinition());
                                window.setTerrainParameters(new TerrainDefinition(_terrainPanel.getUseTerrain(), _terrainPanel.getGridSize()));
+                               window.setDataStatus(_app.getCurrentDataStatus());
                                window.show();
                        }
                        catch (ThreeDException e)