Skip to content

Commit

Permalink
Merge pull request #285 from jnsebgosselin/hydroprint_draw_when_wxdse…
Browse files Browse the repository at this point in the history
…t_is_none

PR: Force a redraw of the hydrograph if wxdset is None after setting the wxdset to that of the closest station from the well.
  • Loading branch information
jnsebgosselin committed Apr 12, 2019
2 parents c223383 + c078324 commit cad51fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gwhat/HydroPrint2.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ def wldset_changed(self):
self.__updateUI = False
self.best_fit_waterlvl()
self.best_fit_time()
self.dmngr.set_closest_wxdset()
if self.dmngr.set_closest_wxdset() is None:
self.draw_hydrograph()
self.__updateUI = True

def wxdset_changed(self):
Expand All @@ -469,7 +470,6 @@ def wxdset_changed(self):
self.draw_hydrograph()

# ---- Draw Hydrograph Handlers

def best_fit_waterlvl(self):
wldset = self.dmngr.get_current_wldset()
if wldset is not None:
Expand Down Expand Up @@ -777,8 +777,8 @@ def load_graph_layout(self, layout):
if layout['wxdset'] in self.dmngr.wxdsets:
self.dmngr.set_current_wxdset(layout['wxdset'])
else:
self.dmngr.set_closest_wxdset()

if self.dmngr.set_closest_wxdset() is None:
self.draw_hydrograph()
self.__updateUI = True

def save_layout_isClicked(self):
Expand Down

0 comments on commit cad51fb

Please sign in to comment.