Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOHViewer
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Public
PASSOFT
SOHViewer
Commits
a6b174b8
Commit
a6b174b8
authored
1 year ago
by
Lan Dam
Browse files
Options
Downloads
Patches
Plain Diff
move detail's comment to code
parent
a01f48c8
No related branches found
No related tags found
1 merge request
!217
Implement dialogs to edit valueColors for 2 multiColorDots plot types
Pipeline
#3346
passed with stage
in 6 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/view/db_config/value_color_helper/edit_value_color_dialog/multi_color_dot_dialog.py
+12
-11
12 additions, 11 deletions
..._helper/edit_value_color_dialog/multi_color_dot_dialog.py
with
12 additions
and
11 deletions
sohstationviewer/view/db_config/value_color_helper/edit_value_color_dialog/multi_color_dot_dialog.py
+
12
−
11
View file @
a6b174b8
...
...
@@ -253,8 +253,7 @@ class MultiColorDotDialog(EditValueColorDialog):
+ If the last row is empty string, that value will be eliminated
from condition.
+ If value not greater than previous row and less than latter row,
give error message. -20 and 20 are given to previous or latter
row if not exist b/c they are out of range of bound [-10, 10]
give error message.
Call set_value_row_id_dict to keep track of value by row_id.
:param row_id: id of the row being checked.
...
...
@@ -272,9 +271,12 @@ class MultiColorDotDialog(EditValueColorDialog):
self
.
changed_row_id
=
None
# -20 is assigned to higher bound of the row before the first row
# to always satisfy validating this row's higher bound value for value
# range is [-10,10]
prev_higher_bound
=
(
float
(
self
.
higher_bound_lnedits
[
row_id
-
1
].
text
())
if
row_id
>
0
else
-
20
)
-
20
if
row_id
==
0
else
float
(
self
.
higher_bound_lnedits
[
row_id
-
1
].
text
())
)
if
self
.
higher_bound_lnedits
[
row_id
].
text
().
strip
()
==
''
:
self
.
handle_clear_higher_bound
(
row_id
)
...
...
@@ -282,13 +284,12 @@ class MultiColorDotDialog(EditValueColorDialog):
self
.
save_colors_btn_clicked
=
False
return
if
row_id
>=
len
(
self
.
row_id_value_dict
)
-
1
:
# When the current higher_bound_lnedits is on the last row
# set the limit 20 to be the next_higher_bound
next_higher_bound
=
20
else
:
next_higher_bound
=
float
(
self
.
higher_bound_lnedits
[
row_id
+
1
].
text
())
# 20 is assigned to higher bound of the row after the last edited row
# to always satisfy validating this row's higher bound value for value
# range is [-10,10]
next_higher_bound
=
(
20
if
row_id
==
len
(
self
.
row_id_value_dict
)
-
1
else
float
(
self
.
higher_bound_lnedits
[
row_id
+
1
].
text
()))
curr_higher_bound
=
float
(
self
.
higher_bound_lnedits
[
row_id
].
text
())
if
(
curr_higher_bound
<=
prev_higher_bound
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment