From 3d1be46f93868f51088ca7c03a52bc913fe20cdb Mon Sep 17 00:00:00 2001
From: "benjamin.jakimow@geo.hu-berlin.de" <q8DTkxUg-BB>
Date: Tue, 17 May 2016 11:58:57 +0200
Subject: [PATCH] opens QGIS Python console to have a valid stdout + stderr

---
 sensecarbon_tsv.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sensecarbon_tsv.py b/sensecarbon_tsv.py
index 4b759c47..177b82f2 100644
--- a/sensecarbon_tsv.py
+++ b/sensecarbon_tsv.py
@@ -1340,11 +1340,11 @@ class TimeSeriesViewer:
         """
         # Save reference to the QGIS interface
         self.iface = iface
+        if isinstance(self.iface, qgis.gui.QgisInterface):
+            import console
+            console.show_console()
 
 
-        #if isinstance(iface, QgsApplication):
-        #self.iface = iface
-
         # initialize plugin directory
         self.plugin_dir = os.path.dirname(__file__)
         # initialize locale
@@ -1545,6 +1545,9 @@ class TimeSeriesViewer:
         D.spinBox_coordinate_x.setValue(x)
         D.spinBox_coordinate_y.setValue(y)
 
+        if D.cb_loadSubsetDirectly.isChecked():
+            self.ua_showPxCoordinate_start()
+
     def qgs_handleMouseDown(self, pt, btn):
         pass
 
-- 
GitLab