Skip to content

Commit

Permalink
Merge pull request #126 from PUTvision/feat/hide_menu_elements
Browse files Browse the repository at this point in the history
Replace setEnabled with setVisible for menu blocks
  • Loading branch information
bartoszptak authored Jan 4, 2024
2 parents 0ee1cdb + 0fc4287 commit 0f1a2fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/deepness/deepness_dockwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ def _model_type_changed(self):
else:
raise Exception(f"Unsupported model type ({model_type})!")

self.mGroupBox_segmentationParameters.setEnabled(segmentation_enabled)
self.mGroupBox_detectionParameters.setEnabled(detection_enabled)
self.mGroupBox_regressionParameters.setEnabled(regression_enabled)
self.mGroupBox_superresolutionParameters.setEnabled(superresolution_enabled)
self.mGroupBox_segmentationParameters.setVisible(segmentation_enabled)
self.mGroupBox_detectionParameters.setVisible(detection_enabled)
self.mGroupBox_regressionParameters.setVisible(regression_enabled)
self.mGroupBox_superresolutionParameters.setVisible(superresolution_enabled)
# Disable output format options for super-resolution models.
self.mGroupBox_6.setEnabled(not superresolution_enabled)

Expand Down
2 changes: 1 addition & 1 deletion src/deepness/processing/processing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_raster_block(band_number_):
extent,
image_size[0], image_size[1])
block_height, block_width = raster_block.height(), raster_block.width()
if block_width == 0 or block_width == 0:
if block_height == 0 or block_width == 0:
raise Exception("No data on layer within the expected extent!")
return raster_block

Expand Down

0 comments on commit 0f1a2fe

Please sign in to comment.