Skip to content
Permalink
Browse files
fixed python console (was displaying plain text)
git-svn-id: http://svn.osgeo.org/qgis/trunk@8479 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed May 21, 2008
1 parent b849af0 commit 78c9fdefafbae1a1b9270b17528a6cb8d8de09e4
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/app/qgspythondialog.cpp
@@ -17,7 +17,6 @@
#include "qgspythondialog.h"
#include "qgspythonutils.h"


QgsPythonDialog::QgsPythonDialog(QgisInterface* pIface, QWidget *parent)
: QDialog(parent)
{
@@ -64,14 +63,12 @@ void QgsPythonDialog::on_edtCmdLine_returnPressed()
output = "<font color=\"red\">" + escapeHtml(className) + ": " + escapeHtml(errorText) + "</font><br>";
}

QString str = "<b><font color=\"green\">>>></font> " + escapeHtml(command) + "</b><br>" + output;
#if QT_VERSION < 0x040300
txtHistory->setText(txtHistory->text() + str);
#else
txtHistory->setPlainText(txtHistory->toPlainText() + str);
#endif
QString str = "<b><font color=\"green\">&gt;&gt;&gt;</font> " + escapeHtml(command) + "</b><br>" + output;

edtCmdLine->setText("");

txtHistory->moveCursor(QTextCursor::End);
txtHistory->insertHtml(str);
txtHistory->moveCursor(QTextCursor::End);
txtHistory->ensureCursorVisible();
}

0 comments on commit 78c9fde

Please sign in to comment.