From: sln Date: Tue, 29 May 2007 13:46:41 +0000 (+0000) Subject: Bug NPAL16035: Pb with the history list of salome (GUI). Case when command length... X-Git-Tag: T15881~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=52832a3adf8e9e41935cc41994efbe1f36e4fcbe;p=modules%2Fgui.git Bug NPAL16035: Pb with the history list of salome (GUI). Case when command length is approximately equal to the width of screen solved. --- diff --git a/src/PythonConsole/PythonConsole_PyEditor.cxx b/src/PythonConsole/PythonConsole_PyEditor.cxx index c585838c4..e321f9322 100755 --- a/src/PythonConsole/PythonConsole_PyEditor.cxx +++ b/src/PythonConsole/PythonConsole_PyEditor.cxx @@ -818,7 +818,8 @@ void PythonConsole_PyEditor::scrollViewAfterHistoryUsing( const QString& command return; } - int aCommandLength = QFontMetrics( currentFont() ).width( command ); + QFontMetrics aFM( currentFont() ); + int aCommandLength = aFM.width( command ) + aFM.width( READY_PROMPT ) + 5; int aVisibleWidth = visibleWidth(); QScrollBar* aBar = horizontalScrollBar(); if ( aBar )