[GRASS-SVN] r34021 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 27 11:17:52 EDT 2008


Author: marisn
Date: 2008-10-27 11:17:52 -0400 (Mon, 27 Oct 2008)
New Revision: 34021

Modified:
   grass/branches/develbranch_6/lib/gis/gui.tcl
Log:
Fix autogenerated modules UI issues with tabs Required and Output. Fixes glitches introduced by r31340

Modified: grass/branches/develbranch_6/lib/gis/gui.tcl
===================================================================
--- grass/branches/develbranch_6/lib/gis/gui.tcl	2008-10-27 13:53:49 UTC (rev 34020)
+++ grass/branches/develbranch_6/lib/gis/gui.tcl	2008-10-27 15:17:52 UTC (rev 34021)
@@ -346,7 +346,7 @@
 	global bgcolor
 
 	if {$guisection == {}} {set guisection {{}}}
-		
+
 	if {[llength $guisection] == 1} {
 		# A frame for a toplevel section
 		# This uses a scrolled frame in a notebook tab
@@ -356,10 +356,10 @@
 			set guisection {Options}
 		}
 		set path $opt($dlg,path)
-		if {$glabel == "Required"} {
-			set optpane [$path.nb insert 0 $guisection -text $glabel]
-		} else {
-			set optpane [$path.nb insert end $guisection -text $glabel]			
+		set optpane [$path.nb insert end $guisection -text $glabel]
+		# Word "required" in $glabel may be translated
+		if {$glabel == [G_msg "Required"]} {
+			$path.nb move $guisection 0
 		}
 		# Specials don't get scrolling frames:
 		if {$optn == -1} {
@@ -418,11 +418,7 @@
 		set guisection {Options}
 	}
 	
-	set firstpg [$path.nb pages 0]
 	$path.nb raise $guisection
-	
-	#Make the first tab the active one instead of the "options" tab
-	$path.nb raise $firstpg
 }
 
 proc layout_raise_special_frame {dlg guisection key} {
@@ -747,12 +743,18 @@
 	make_dialog_end $dlg $path $root
 	
 	if {$n > 0} {
-		layout_raise_frame $dlg $opt($dlg,1,guisection) 1
+		# Rise first page
+		$path.nb raise [$path.nb pages 0] 
 	}
 
 	update
 
 	show_cmd $dlg
+	
+	# Following commands will force redrawing of notebook
+	# It is required in case if pages where rearranged
+	$path.nb _realize
+	$path.nb _redraw
 }
 
 proc add_option {optn optlist} {



More information about the grass-commit mailing list