Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 78c9fde
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/app/qgspythondialog.cpp
Expand Up @@ -17,7 +17,6 @@
#include "qgspythondialog.h"
#include "qgspythonutils.h"


QgsPythonDialog::QgsPythonDialog(QgisInterface* pIface, QWidget *parent)
: QDialog(parent)
{
Expand Down Expand Up @@ -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.