From d0fd00305cd0f98f379f9e43aa5b3e926858103e Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Thu, 26 Sep 2024 03:26:27 +0000 Subject: [PATCH 1/3] fixed flake8 --- gui/wxpython/gcp/manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/wxpython/gcp/manager.py b/gui/wxpython/gcp/manager.py index e5e0dd37471..73f1e8a897d 100644 --- a/gui/wxpython/gcp/manager.py +++ b/gui/wxpython/gcp/manager.py @@ -891,8 +891,8 @@ def OnSrcSelection(self, event): if p.returncode == 0: print("returncode = ", str(p.returncode)) self.parent.Map.region = self.parent.Map.GetRegion() - except: - pass + except Exception as e: + print(f"An error occurred: {e}") def OnTgtRastSelection(self, event): """Source map to display selected""" From 299f477e4b704627991f94cf833a6c648a0cf1f6 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Thu, 26 Sep 2024 03:29:27 +0000 Subject: [PATCH 2/3] update .flake8 --- .flake8 | 1 - 1 file changed, 1 deletion(-) diff --git a/.flake8 b/.flake8 index d570fac7990..f2e9f81ebaa 100644 --- a/.flake8 +++ b/.flake8 @@ -30,7 +30,6 @@ per-file-ignores = gui/wxpython/dbmgr/sqlbuilder.py: E722 gui/wxpython/dbmgr/manager.py: E722 gui/wxpython/docs/wxgui_sphinx/conf.py: E402, W291 - gui/wxpython/gcp/manager.py: E722 gui/wxpython/gui_core/*: E266, E722 gui/wxpython/gui_core/dialogs.py: E722 gui/wxpython/gui_core/forms.py: E722 From 2b9e44179aeb73ec38e537eb1ca2bb5d21ab4939 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Thu, 26 Sep 2024 14:23:03 +0000 Subject: [PATCH 3/3] updated as per comment --- gui/wxpython/gcp/manager.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/gui/wxpython/gcp/manager.py b/gui/wxpython/gcp/manager.py index 73f1e8a897d..304dad4e9c4 100644 --- a/gui/wxpython/gcp/manager.py +++ b/gui/wxpython/gcp/manager.py @@ -880,20 +880,6 @@ def OnSrcSelection(self, event): else: wx.FindWindowById(wx.ID_FORWARD).Enable(True) - try: - # set computational region to match selected map and zoom display - # to region - if maptype == "raster": - p = RunCommand("g.region", "raster=src_map") - elif maptype == "vector": - p = RunCommand("g.region", "vector=src_map") - - if p.returncode == 0: - print("returncode = ", str(p.returncode)) - self.parent.Map.region = self.parent.Map.GetRegion() - except Exception as e: - print(f"An error occurred: {e}") - def OnTgtRastSelection(self, event): """Source map to display selected""" global tgt_map