tab-size in QEditor

Roberto Raggi roberto at kdevelop.org
Mon Jan 13 11:47:04 UTC 2003


Hi Milo,

On Mon, 2003-01-13 at 05:35, Milo Hoffman wrote:
> > This is due to the order of calling setFont and setTabStopWidth in
> > QEditor::updateStyles(). Moving the setFont call below the two
> > setTabStopWidth calls, removes this bug.
> 
> the setFont call must be before the other twos, of course. hm, it's later than i thought :-|
> 
> Milo
> 
> /usr/src/kde # diff -u3 kdevelop/parts/qeditor/qeditor.cpp qeditor.cpp
> --- kdevelop/parts/qeditor/qeditor.cpp  2002-12-22 03:11:09.000000000 +0100
> +++ qeditor.cpp 2003-01-13 05:31:28.000000000 +0100
> @@ -303,9 +303,9 @@
>      int tabwidth = tabStop();
>      QSourceColorizer* colorizer = dynamic_cast<QSourceColorizer*>( document()->preProcessor() );
>      if( colorizer ){
> +       setFont( colorizer->format( 0 )->font() );
>         setTabStopWidth( colorizer->format(0)->width('x') * tabwidth );
>         document()->setTabStops( colorizer->format(0)->width('x') * tabwidth );
> -       setFont( colorizer->format( 0 )->font() );
>      }
>      KTextEdit::updateStyles();
>  }

thanks for your patch ;) i've just applied

ciao robe





More information about the KDevelop-devel mailing list