[GRASS-SVN] r35139 - grass/branches/releasebranch_6_4/visualization/nviz/scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 1 12:28:47 EST 2009


Author: cmbarton
Date: 2009-01-01 12:28:47 -0500 (Thu, 01 Jan 2009)
New Revision: 35139

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

Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_site.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_site.tcl	2009-01-01 17:25:31 UTC (rev 35138)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_site.tcl	2009-01-01 17:28:47 UTC (rev 35139)
@@ -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/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vect.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vect.tcl	2009-01-01 17:25:31 UTC (rev 35138)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vect.tcl	2009-01-01 17:28:47 UTC (rev 35139)
@@ -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/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vol.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vol.tcl	2009-01-01 17:25:31 UTC (rev 35138)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vol.tcl	2009-01-01 17:28:47 UTC (rev 35139)
@@ -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