Skip to content

Commit

Permalink
Cleaner if in reccard
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyril Danilevski committed Jun 24, 2020
1 parent c842f6e commit d055aa8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gourmet/reccard.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ def update_recipe (self, recipe):
self.current_rec = recipe
if hasattr(self,'recipe_display'):
self.recipe_display.update_from_database()
if (self.rec_editor is not None and
not self.rec_editor.window.is_visible()):
if self.rec_editor and not self.rec_editor.window.is_visible():
self.rec_editor = None

def show (self):
Expand All @@ -133,9 +132,7 @@ def show (self):

def hide (self):
if ((not (hasattr(self,'recipe_display') and self.recipe_display.window.get_property('visible')))
and
(self.rec_editor is not None and
not self.rec_editor.window.is_visible())):
and (self.rec_editor and not self.rec_editor.window.is_visible())):
self.rg.del_rc(self.current_rec.id)

# end RecCard
Expand Down

0 comments on commit d055aa8

Please sign in to comment.