Skip to content

Commit

Permalink
詳細なエラーメッセージに変更,ウィンドウを閉じるオプションを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
KeiTa4446 committed Jun 10, 2024
1 parent 5ffba5c commit 42bfc87
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 6 additions & 2 deletions dem_to_csmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ def convert_dem_to_csmap(self):
)
except Exception as e:
iface.messageBar().pushMessage(
"ERROR", f"処理中に問題が発生しました.: {e}", level=Qgis.Critical
"ERROR",
f"DEMデータの処理中に問題が発生しました.: {e}",
level=Qgis.Critical,
)
return

# 出力結果をQGISに追加
iface.addRasterLayer(output_path, os.path.basename(output_path))

self.close()
# 処理終了後にウィンドウを閉じるオプション
if self.ui.checkBox_closeAfterProcessing.isChecked():
self.close()
9 changes: 8 additions & 1 deletion dem_to_csmap.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>389</width>
<height>168</height>
<height>191</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -34,6 +34,13 @@
<item>
<widget class="QgsFileWidget" name="mQgsFileWidget_output"/>
</item>
<item>
<widget class="QCheckBox" name="checkBox_closeAfterProcessing">
<property name="text">
<string>処理終了後,自動でウィンドウを閉じる</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
Expand Down

0 comments on commit 42bfc87

Please sign in to comment.