GeoView : issues 4674 and 4773 crash when quitting gramps.
svn: r16887
This commit is contained in:
parent
bd6707cbcc
commit
540665d7d5
@ -854,6 +854,7 @@ class GeoView(HtmlView):
|
|||||||
We need to suppress temporary files here.
|
We need to suppress temporary files here.
|
||||||
Save the zoom, latitude, longitude and lock
|
Save the zoom, latitude, longitude and lock
|
||||||
"""
|
"""
|
||||||
|
self.javascript_ready = False
|
||||||
self._savezoomandposition()
|
self._savezoomandposition()
|
||||||
if config.get('geoview.lock'):
|
if config.get('geoview.lock'):
|
||||||
config.set('geoview.zoom', int(self.realzoom))
|
config.set('geoview.zoom', int(self.realzoom))
|
||||||
@ -893,12 +894,17 @@ class GeoView(HtmlView):
|
|||||||
return
|
return
|
||||||
if not self.resize_occurs:
|
if not self.resize_occurs:
|
||||||
self.resize_occurs = True
|
self.resize_occurs = True
|
||||||
gobject.timeout_add(1000, self._really_resize_the_map,
|
gobject.timeout_add(300, self._really_resize_the_map,
|
||||||
widget, event, data)
|
widget, event, data)
|
||||||
|
|
||||||
def _really_resize_the_map(self, widget, event, data=None):
|
def _really_resize_the_map(self, widget, event, data=None):
|
||||||
# VPane -> Hpane -> NoteBook -> HPaned -> VBox -> Window
|
# VPane -> Hpane -> NoteBook -> HPaned -> VBox -> Window
|
||||||
# We need to get the HPaned size and the VPaned size.
|
# We need to get the HPaned size and the VPaned size.
|
||||||
|
if not self.javascript_ready:
|
||||||
|
# Two reason for this :
|
||||||
|
# 1 - we are quitting gramps
|
||||||
|
# 2 - the renderer is not ready to accept javascript
|
||||||
|
return
|
||||||
self.resize_occurs = False
|
self.resize_occurs = False
|
||||||
self.box1_size = self.box1.get_allocation()
|
self.box1_size = self.box1.get_allocation()
|
||||||
self.header_size = self.box1_size.height
|
self.header_size = self.box1_size.height
|
||||||
|
Loading…
Reference in New Issue
Block a user