[QGIS Commit] r8479 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed May 21 10:35:27 EDT 2008


Author: wonder
Date: 2008-05-21 10:35:27 -0400 (Wed, 21 May 2008)
New Revision: 8479

Modified:
   trunk/qgis/src/app/qgspythondialog.cpp
Log:
fixed python console (was displaying plain text)


Modified: trunk/qgis/src/app/qgspythondialog.cpp
===================================================================
--- trunk/qgis/src/app/qgspythondialog.cpp	2008-05-21 09:03:53 UTC (rev 8478)
+++ trunk/qgis/src/app/qgspythondialog.cpp	2008-05-21 14:35:27 UTC (rev 8479)
@@ -17,7 +17,6 @@
 #include "qgspythondialog.h"
 #include "qgspythonutils.h"
 
-
 QgsPythonDialog::QgsPythonDialog(QgisInterface* pIface, QWidget *parent)
   : QDialog(parent)
 {
@@ -64,14 +63,12 @@
     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();
 }



More information about the QGIS-commit mailing list