[GRASS-SVN] r35140 - grass/trunk/visualization/nviz/scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 1 12:30:51 EST 2009


Author: cmbarton
Date: 2009-01-01 12:30:51 -0500 (Thu, 01 Jan 2009)
New Revision: 35140

Modified:
   grass/trunk/visualization/nviz/scripts/panel_site.tcl
   grass/trunk/visualization/nviz/scripts/panel_vect.tcl
   grass/trunk/visualization/nviz/scripts/panel_vol.tcl
Log:
Fix buttons so that they display properly in Mac aqua as well as x11

Modified: grass/trunk/visualization/nviz/scripts/panel_site.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/panel_site.tcl	2009-01-01 17:28:47 UTC (rev 35139)
+++ grass/trunk/visualization/nviz/scripts/panel_site.tcl	2009-01-01 17:30:51 UTC (rev 35140)
@@ -55,8 +55,8 @@
 	Label $top.current -text "Current:" -anchor w
     mkMapList $top.list site
     
-	button $top.new -text New -anchor center -width 4 -command "add_map site" -bd 1
-	button $top.delete -text Delete -anchor center -width 4 -command "delete_map site" -bd 1
+	button $top.new -text New -anchor center -command "add_map site" -bd 1
+	button $top.delete -text Delete -anchor center -command "delete_map site" -bd 1
     
 	pack $top.current $top.list -side left
 	pack $top.delete $top.new -side right -expand 0

Modified: grass/trunk/visualization/nviz/scripts/panel_vect.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/panel_vect.tcl	2009-01-01 17:28:47 UTC (rev 35139)
+++ grass/trunk/visualization/nviz/scripts/panel_vect.tcl	2009-01-01 17:30:51 UTC (rev 35140)
@@ -38,7 +38,7 @@
 
     set curr [Nget_current vect]
     
-    if {0 != $curr}  {
+    if {$curr != 0}  {
 		set width [Nvect$curr get_att width]
 		set flat_state [Nvect$curr get_att flat]
 		set height [expr [lindex [Nvect$curr get_trans] 2] * 10]
@@ -66,8 +66,8 @@
 	
     mkMapList $tmp.list vect
     
-	button $tmp.new -text New -anchor center -width 4 -command "add_map vect" -bd 1
-	button $tmp.delete -text Delete -anchor center -width 4 -command "delete_map vect" -bd 1
+	button $tmp.new -text New -anchor center -command "add_map vect" -bd 1
+	button $tmp.delete -text Delete -anchor center -command "delete_map vect" -bd 1
 
 	pack $tmp.current $tmp.list -side left
     pack $tmp.list -side left 
@@ -374,25 +374,29 @@
 
 #Procedure to update vect atts from radiobutton
 proc check_list {address} {
-    global Nv_ flat_state curr vect_height
+    global Nv_ 
+    global flat_state 
+    global curr 
+    global vect_height
 
     set state [winfo exists $address]
     set curr [Nget_current vect]
-    if {0 != $curr}  {
-	set maplist [Nget_map_list surf]
 
+    if {$curr != 0}  {
+        set maplist [Nget_map_list surf]
+
         if {$state == 0 && $flat_state == 0 } {
-        #display on surface
-	catch {destroy $address}
-        Nvect$curr set_att flat 0
-	Nv_mkSurfacelist $address $maplist Nvect$curr vect
-	pack $address
-	} 
-        if { $state == 1 && $flat_state == 1} {
-        #display on flat
-	catch {destroy $address}
-	Nvect$curr set_att flat 1
-	}
-     }
+            #display on surface
+            catch {destroy $address}
+            Nvect$curr set_att flat 0
+            Nv_mkSurfacelist $address $maplist Nvect$curr vect
+            pack $address
+        } 
+        if {$state == 1 && $flat_state == 1} {
+            #display on flat
+            catch {destroy $address}
+            Nvect$curr set_att flat 1
+        }
+    }
 	
 }

Modified: grass/trunk/visualization/nviz/scripts/panel_vol.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/panel_vol.tcl	2009-01-01 17:28:47 UTC (rev 35139)
+++ grass/trunk/visualization/nviz/scripts/panel_vol.tcl	2009-01-01 17:30:51 UTC (rev 35140)
@@ -50,8 +50,8 @@
 
     label $tmp.current -text "Current:" -anchor w
     mkMapList $tmp.list vol
-    button $tmp.new -text New -anchor center -bd 1 -width 4 -command new_vol
-    button $tmp.delete -text Delete -anchor center -bd 1 -width 4 -command delete_vol
+    button $tmp.new -text New -anchor center -bd 1 -command new_vol
+    button $tmp.delete -text Delete -anchor center -bd 1 -command delete_vol
 
 	pack $tmp.current $tmp.list -side left
 	pack $tmp.delete $tmp.new -side right -expand 0



More information about the grass-commit mailing list