Skip to content

Commit

Permalink
Enable reload sampling file button only when there is a valid samplin…
Browse files Browse the repository at this point in the history
…g file selected
  • Loading branch information
XavierCLL committed Sep 30, 2024
1 parent ac0419a commit ac04ad5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions gui/acatama_dockwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def setup_gui(self):
# ######### Sampling tab ######### #
# disable sampling window
self.QPBtn_OpenSamplingDesignWindow.setDisabled(True)
self.QCBox_SamplingFile.currentIndexChanged[int].connect(lambda index: self.QPBtn_reloadSamplingFile.setEnabled(index > 0))
# set and update the sampling file status in analysis tab
self.QCBox_SamplingFile.layerChanged.connect(self.update_analysis_state)
# show the sampling design window when press the QPBtn_OpenSamplingDesignWindow
Expand Down
3 changes: 3 additions & 0 deletions ui/acatama_dockwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ It set automatically from image if the layer has the nodata value set.</string>
</item>
<item>
<widget class="QToolButton" name="QPBtn_reloadSamplingFile">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
Expand Down

0 comments on commit ac04ad5

Please sign in to comment.