Skip to content

Commit d64a46f

Browse files
committedSep 30, 2015
[GRASS] use monospace font for module's output
1 parent 56af106 commit d64a46f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed
 

‎src/plugins/grass/qgsgrassmodule.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ QgsGrassModule::QgsGrassModule( QgsGrassTools *tools, QString moduleName, QgisIn
182182
QgsDebugMsg( "called" );
183183

184184
setupUi( this );
185+
// use fixed width font because module's output may be formated
186+
mOutputTextBrowser->setStyleSheet( "font-family: Monospace; font-size: 9pt;" );
185187
lblModuleName->setText( tr( "Module: %1" ).arg( moduleName ) );
186188
mTools = tools;
187189
mIface = iface;
@@ -860,9 +862,7 @@ void QgsGrassModule::readStdout()
860862
while ( mProcess.canReadLine() )
861863
{
862864
QByteArray ba = mProcess.readLine();
863-
//line = QString::fromUtf8( ba ).replace( '\n', "" );
864865
line = QString::fromLocal8Bit( ba ).replace( '\n', "" );
865-
//QgsDebugMsg(QString("line: '%1'").arg(line));
866866

867867
// GRASS_INFO_PERCENT is catched here only because of bugs in GRASS,
868868
// normaly it should be printed to stderr
@@ -873,7 +873,7 @@ void QgsGrassModule::readStdout()
873873
}
874874
else
875875
{
876-
mOutputTextBrowser->append( "<pre>" + line + "</pre>" );
876+
mOutputTextBrowser->append( line );
877877
}
878878
}
879879
}
@@ -888,9 +888,7 @@ void QgsGrassModule::readStderr()
888888
while ( mProcess.canReadLine() )
889889
{
890890
QByteArray ba = mProcess.readLine();
891-
//line = QString::fromUtf8( ba ).replace( '\n', "" );
892891
line = QString::fromLocal8Bit( ba ).replace( '\n', "" );
893-
//QgsDebugMsg(QString("line: '%1'").arg(line));
894892

895893
QString text, html;
896894
int percent;

0 commit comments

Comments
 (0)
Please sign in to comment.