Skip to content
Snippets Groups Projects
Commit fe8eca13 authored by Lan Dam's avatar Lan Dam
Browse files

Merge branch 'i264_multicolordot_adding_new_value' into 'develop'

fix bug not allow adding new higher condition in MultiColorDotDialog

Closes #264

See merge request !299
parents 01f5d4fd 07a774c2
No related branches found
No related tags found
1 merge request!299fix bug not allow adding new higher condition in MultiColorDotDialog
Pipeline #3883 passed with stage
in 7 minutes and 20 seconds
...@@ -240,7 +240,7 @@ class MultiColorDotDialog(EditValueColorDialog): ...@@ -240,7 +240,7 @@ class MultiColorDotDialog(EditValueColorDialog):
if prev_higher_bound != -20 else '') if prev_higher_bound != -20 else '')
cond += (f"d < {next_higher_bound}" cond += (f"d < {next_higher_bound}"
if next_higher_bound != 20 else 'd') if next_higher_bound != 20 else 'd')
msg = f"Value entered must be: {cond}" msg = f"Value d entered must be: {cond}"
QtWidgets.QMessageBox.information(self, "Error", msg) QtWidgets.QMessageBox.information(self, "Error", msg)
try: try:
self.higher_bound_lnedits[row_id].setText( self.higher_bound_lnedits[row_id].setText(
...@@ -293,7 +293,7 @@ class MultiColorDotDialog(EditValueColorDialog): ...@@ -293,7 +293,7 @@ class MultiColorDotDialog(EditValueColorDialog):
# to always satisfy validating this row's higher bound value for value # to always satisfy validating this row's higher bound value for value
# range is [-10,10] # range is [-10,10]
next_higher_bound = ( next_higher_bound = (
20 if row_id == len(self.row_id_value_dict) - 1 20 if row_id >= len(self.row_id_value_dict) - 1
else float(self.higher_bound_lnedits[row_id + 1].text())) else float(self.higher_bound_lnedits[row_id + 1].text()))
curr_higher_bound = float(self.higher_bound_lnedits[row_id].text()) curr_higher_bound = float(self.higher_bound_lnedits[row_id].text())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment