Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace setEnabled with setVisible for menu blocks #126

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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