Skip to content

Commit

Permalink
Update access to recipe_editor in reccard
Browse files Browse the repository at this point in the history
  • Loading branch information
cydanil committed Jun 23, 2020
1 parent dbc773e commit c10dd7d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gourmet/reccard.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
from typing import Callable
import gc
import webbrowser

Expand All @@ -8,7 +9,6 @@
from PIL import Image
except ImportError:
import Image
import types
import xml.sax.saxutils
from gi.repository import Pango
from .exporters import exportManager
Expand Down Expand Up @@ -2834,9 +2834,10 @@ def inverse (self):
self.history.remove(self)
self.inverse_action()

def add_with_undo (rc,method):
idx = rc.re.module_tab_by_name["ingredients"]
ing_controller = rc.re.modules[idx].ingtree_ui.ingController

def add_with_undo(rc: 'RecCard', method: Callable):
idx = rc.recipe_editor.module_tab_by_name["ingredients"]
ing_controller = rc.recipe_editor.modules[idx].ingtree_ui.ingController
uts = UndoableTreeStuff(ing_controller)

def do_it ():
Expand Down

0 comments on commit c10dd7d

Please sign in to comment.