Skip to content

Commit

Permalink
Revert "fix structure condition field"
Browse files Browse the repository at this point in the history
This reverts commit 7436e4d.
  • Loading branch information
3nids committed Sep 6, 2019
1 parent 1fa1776 commit af591a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions wincan2qgep/gui/databrowserdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def on_importButton_clicked(self):
features[rf['ws_obj_id']] = {
'maintenance': QgsFeature(mf),
'damages': [], 'pictures': [],
'ws_structure_condition': 4
'structure_condition': 4
}

else:
Expand Down Expand Up @@ -340,7 +340,7 @@ def on_importButton_clicked(self):
features[ws_obj_id]['damages'].append(df)
features[ws_obj_id]['pictures'].append(pics)
structure_condition = min(structure_condition, observation['Rate'])
features[ws_obj_id]['ws_structure_condition'] = structure_condition
features[ws_obj_id]['structure_condition'] = structure_condition
self.progressBar.setValue(i)
i += 1

Expand All @@ -363,7 +363,7 @@ def on_importButton_clicked(self):
maintenance = elements['maintenance']
damages = elements['damages']
pictures = elements['pictures']
structure_condition = elements['ws_structure_condition']
structure_condition = elements['structure_condition']

if len(damages) == 0:
continue
Expand Down Expand Up @@ -429,9 +429,9 @@ def on_importButton_clicked(self):
rf = next(wsl.getFeatures(request))
if rf.isValid():
# update structure condition if worse
old_level = structure_condition_2_damage_level(rf['ws_structure_condition'])
old_level = structure_condition_2_damage_level(rf['structure_condition'])
if old_level is None or old_level > 'Z{}'.format(structure_condition):
rf['ws_structure_condition'] = damage_level_2_structure_condition(structure_condition)
rf['structure_condition'] = damage_level_2_structure_condition(structure_condition)
wsl.updateFeature(rf)

i += 1
Expand Down

0 comments on commit af591a8

Please sign in to comment.