From 1fd7485ecfa7076fd0326102b5dc549e04f29d4c Mon Sep 17 00:00:00 2001 From: kamangir Date: Sat, 13 Jul 2024 16:30:00 -0700 Subject: [PATCH] QGIS.clear() fix - kamangir/bolt#746 --- blue_geo/.abcli/QGIS.sh | 2 +- blue_geo/QGIS/__main__.py | 5 ++--- blue_geo/QGIS/console/QGIS.py | 4 ++-- blue_geo/__init__.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/blue_geo/.abcli/QGIS.sh b/blue_geo/.abcli/QGIS.sh index 12b95399..d12aadcf 100644 --- a/blue_geo/.abcli/QGIS.sh +++ b/blue_geo/.abcli/QGIS.sh @@ -14,7 +14,7 @@ function QGIS() { } # internal function to abcli_seed. -function QGIS_seed() { +function abcli_seed_QGIS() { # seed is NOT local seed=$(python3 -m blue_geo.QGIS generate_seed) } diff --git a/blue_geo/QGIS/__main__.py b/blue_geo/QGIS/__main__.py index 98d6854b..b7eef98a 100644 --- a/blue_geo/QGIS/__main__.py +++ b/blue_geo/QGIS/__main__.py @@ -19,9 +19,8 @@ success = False if args.task == "generate_seed": - success = seed = generate_seed() - if success: - print(seed) + success = True + print(generate_seed()) else: success = None diff --git a/blue_geo/QGIS/console/QGIS.py b/blue_geo/QGIS/console/QGIS.py index b93d3092..2fbd7092 100644 --- a/blue_geo/QGIS/console/QGIS.py +++ b/blue_geo/QGIS/console/QGIS.py @@ -51,11 +51,11 @@ def intro(self): ) def clear(self): - # https://gis.stackexchange.com/a/216444/210095 + # https://gis.stackexchange.com/a/480025/250728 from qgis.PyQt.QtWidgets import QDockWidget consoleWidget = iface.mainWindow().findChild(QDockWidget, "PythonConsole") - consoleWidget.console.shellOut.clearConsole() + consoleWidget.widget().console.clearButton.trigger() self.intro() diff --git a/blue_geo/__init__.py b/blue_geo/__init__.py index a50b9a9f..6d1ccbb5 100644 --- a/blue_geo/__init__.py +++ b/blue_geo/__init__.py @@ -4,7 +4,7 @@ DESCRIPTION = f"{ICON} AI for precise geospatial data analysis and visualization." -VERSION = "4.33.1" +VERSION = "4.34.1" REPO_NAME = "blue-geo"