Skip to content

Commit

Permalink
Expose active card through Previewer
Browse files Browse the repository at this point in the history
  • Loading branch information
glutanimate committed Jun 26, 2017
1 parent 3987749 commit 8b2c84d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions advanced_previewer/previewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ def __init__(self, browser):
self.mw = self.b.mw
# list of currently previewed card ids
self.cards = []
self.card = self.b.card
# indicates whether user clicked on card in preview
self.linkClicked = False
self.setWindowTitle(_("Preview"))
self.setObjectName("Previewer")
self.setupConfig()
self.initUI()
self.finished.connect(self.b._onPreviewFinished)
Expand Down Expand Up @@ -579,6 +581,7 @@ def scrollToCard(self, cid):
window.scrollTo(0, middle);
toggleActive(elm);
""" % cid)
self.card = self.b.card


def _renderPreviewWrapper(self, cardChanged=False):
Expand Down

0 comments on commit 8b2c84d

Please sign in to comment.