diff --git a/locale/pl/LC_MESSAGES/pysol.mo b/locale/pl/LC_MESSAGES/pysol.mo index 8e445a03c..3c3f76864 100644 Binary files a/locale/pl/LC_MESSAGES/pysol.mo and b/locale/pl/LC_MESSAGES/pysol.mo differ diff --git a/locale/pt_BR/LC_MESSAGES/pysol.mo b/locale/pt_BR/LC_MESSAGES/pysol.mo index f9dd965f7..2297e4d01 100644 Binary files a/locale/pt_BR/LC_MESSAGES/pysol.mo and b/locale/pt_BR/LC_MESSAGES/pysol.mo differ diff --git a/pysollib/kivy/LObjWrap.py b/pysollib/kivy/LObjWrap.py index b43d4dcea..326ee3607 100644 --- a/pysollib/kivy/LObjWrap.py +++ b/pysollib/kivy/LObjWrap.py @@ -40,7 +40,7 @@ def __init__(self,obj,ref=None,command=None): self.bind(value=command) def on_value(self,inst,val): - logging.info("LObjWrap: %s = %s" % (self.ref,val)) + # logging.info("LObjWrap: %s = %s" % (self.ref,val)) if self.ref is not None: setattr(self.obj,self.ref,val) diff --git a/pysollib/kivy/tkwidget.py b/pysollib/kivy/tkwidget.py index cecc33c2c..68c07a304 100644 --- a/pysollib/kivy/tkwidget.py +++ b/pysollib/kivy/tkwidget.py @@ -387,6 +387,7 @@ def __init__(self, inner, **kw): self.scale_min = 1.0 self.scale_max = 2.2 self.lock_pos = None + self.lock_chk = None self.offset = None self.tkopt = None @@ -420,8 +421,10 @@ def _update(self): dx = round(self.offset[0] * (self.bbox[1][0] - self.size[0])) dy = round(self.offset[1] * (self.bbox[1][1] - self.size[1])) self.pos = (self.parent.pos[0]-dx,self.parent.pos[1]-dy) + if self.lock_chk is None: + Clock.schedule_once(lambda dt: self.chk_bnd()) # noqa self.lock_pos = None - print("_update",self.pos,self.size) + # print("_update",self.pos,self.size) def _updatesize(self,instance,value): self.inner.size = self.size @@ -466,6 +469,10 @@ def on_transform_with_touch(self,touch): def chk_bnd(self): # Keep the game on the screen. + # check and set lock + if self.lock_chk is not None: return + self.lock_chk = "locked" + # limiting parameters: pos,size = self.bbox w,h = size @@ -502,6 +509,9 @@ def chk_bnd(self): zoominfo = [zoom, 0.0, 0.0] self.tkopt.table_zoom.value = zoominfo + # remove lock + self.lock_chk = None + class LScrollFrame(BoxLayout,StencilView): def __init__(self, **kw):