Skip to content

Commit

Permalink
'setSectionResizeMode' instead of 'setResizeMode' -> old method has b…
Browse files Browse the repository at this point in the history
…een deprecated
  • Loading branch information
steffi1296 committed Dec 5, 2024
1 parent 1217fe4 commit 9b48507
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion enmapbox/apps/lmuvegetationapps/IVVRM/IVVRM_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ def read_file(self):
self.gui.tablePreview.setItem(row, col, item_wl) # place wavelength item
self.gui.tablePreview.setItem(row, col + 1, item_weigh) # place weight item

self.gui.tablePreview.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents)
self.gui.tablePreview.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
self.flag_srf = True
self.flag_image = False
self.check_flags() # check if the app is ready to be run
Expand Down
4 changes: 2 additions & 2 deletions enmapbox/apps/lmuvegetationapps/LUT/CreateLUT_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ def read_file(self):
self.gui.tablePreview.setItem(row, col, item_wl) # place wavelength item
self.gui.tablePreview.setItem(row, col + 1, item_weigh) # place weight item

self.gui.tablePreview.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents)
self.gui.tablePreview.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
self.flag_srf = True
self.flag_image = False
self.check_flags() # check if the app is ready to be run
Expand Down Expand Up @@ -1297,7 +1297,7 @@ def image_read(self): # read only necessary info: fwhm and center wavelengths
for i in self.outreach:
self.gui.tablePreview.item(i, 0).setBackground(QColor(200, 0, 0))
self.gui.tablePreview.setHorizontalHeaderLabels(header_items)
self.gui.tablePreview.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents)
self.gui.tablePreview.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
wavelength_srf = np.delete(wavelength, self.outreach)
fwhm_srf = np.delete(fwhm, self.outreach)
self.x = np.array(list(zip(wavelength_srf, fwhm_srf)))
Expand Down

0 comments on commit 9b48507

Please sign in to comment.