[GRASS-dev] Re: [GRASS GIS] #606: WinGRASS GIS.m: broken newlines in output window

GRASS GIS trac at osgeo.org
Sun May 17 10:49:24 EDT 2009


#606: WinGRASS GIS.m: broken newlines in output window
---------------------------+------------------------------------------------
  Reporter:  hamish        |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect        |      Status:  new                      
  Priority:  major         |   Milestone:  6.4.0                    
 Component:  Tcl           |     Version:  6.4.0 RCs                
Resolution:                |    Keywords:  wingrass gis.m           
  Platform:  MSWindows XP  |         Cpu:  x86-32                   
---------------------------+------------------------------------------------
Comment (by hamish):

 manually changing the "\n" to "\r\n" doesn't help any.

 the following patch stops the first letter from ending up on the right
 side of the scissors icon, but sometimes* still (temporarily) chops off
 the first letter. no idea why.


 [*] it follows a regular pattern: first 3 or 4 times 'Run'ning g.version
 gives correct output, ~3rd or 4th time the first letter is missing until
 you hit [Run] again, then the previous output is refreshed & gets its
 first char back. Once you have enough output to need the scrollbar (with
 the patch it) doesn't remove the leading char anymore.

 When compared to the correctly working linux version, WinGrass + the patch
 is the same with a single blank line between the grey command bar and the
 output text for g.version. But for 'g.proj -p' the first run has 1 blank
 line, the 2nd & on have two leading blank lines.

 {{{
 Index: lib/gtcltk/gronsole.tcl
 ===================================================================
 --- lib/gtcltk/gronsole.tcl     (revision 37251)
 +++ lib/gtcltk/gronsole.tcl     (working copy)
 @@ -406,6 +406,8 @@

         if {[llength $lines] != 0} {
                 Gronsole::add_data_tag $path $ci out
 +               Gronsole::output_to_gronsole $path $mark $ci [list cmd$ci
 cmd$ci-out] "\n"
 +               update
         }

         #output any messages from running the command
 }}}


 adding or removing the +update in that makes no change AFAICT.



 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/606#comment:1>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list