Skip to content

Commit fc658ff

Browse files
author
wonder
committed
fixed python console (was displaying plain text)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8479 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 88ce567 commit fc658ff

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/app/qgspythondialog.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "qgspythondialog.h"
1818
#include "qgspythonutils.h"
1919

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

67-
QString str = "<b><font color=\"green\">>>></font> " + escapeHtml(command) + "</b><br>" + output;
68-
#if QT_VERSION < 0x040300
69-
txtHistory->setText(txtHistory->text() + str);
70-
#else
71-
txtHistory->setPlainText(txtHistory->toPlainText() + str);
72-
#endif
66+
QString str = "<b><font color=\"green\">&gt;&gt;&gt;</font> " + escapeHtml(command) + "</b><br>" + output;
67+
7368
edtCmdLine->setText("");
7469

70+
txtHistory->moveCursor(QTextCursor::End);
71+
txtHistory->insertHtml(str);
7572
txtHistory->moveCursor(QTextCursor::End);
7673
txtHistory->ensureCursorVisible();
7774
}

0 commit comments

Comments
 (0)