Skip to content

Commit

Permalink
Fixed plot storyboard blocked, FLTD-213
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele Paganelli committed Nov 16, 2016
1 parent a82eb9d commit 1e488d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions misura/client/graphics/storyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from veusz import document

from misura.client.iutils import calc_plot_hierarchy

from misura.canon.logger import Log as logging
from PyQt4 import QtGui, QtCore


Expand Down Expand Up @@ -121,10 +121,13 @@ def update_page_image(self, page=False):

def update(self):
p = self.plot.plot.getPageNumber()
if p<len(self.doc.basewidget.children)-1:
logging.debug('Storyboard.update', p, self.level_modifier, self._level_modifier)
if p>len(self.doc.basewidget.children)-1:
logging.debug('Cannot locate page', p, len(self.doc.basewidget.children)-1)
return False
page = self.doc.basewidget.children[p]
if page == self.page and self.level_modifier == self._level_modifier:
logging.debug('Storyboard.update: no change')
return False
self.clear()
if self.page:
Expand All @@ -139,6 +142,7 @@ def update(self):
self.update_page_image()
hierarchy, level, page_idx = calc_plot_hierarchy(self.doc, page)
if level < 0:
logging.debug('Storyboard.update: negative level requested')
return False
page_name, page_plots, crumbs = hierarchy[level][page_idx]

Expand Down

0 comments on commit 1e488d1

Please sign in to comment.