[Bugs] #486 UNSP: The image opened is very small
SugarLabs Bugs
bugtracker-noreply at sugarlabs.org
Tue Mar 24 13:48:17 EDT 2009
#486: The image opened is very small
------------------------------------------+---------------------------------
Reporter: erikos | Owner: sayamindu
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: 0.84
Component: Imageviewer | Version: 0.84.x
Severity: Blocker | Resolution:
Keywords: | Distribution: Unspecified
Status_field: New |
------------------------------------------+---------------------------------
Comment(by tomeu):
This seems to work fine:
{{{
diff --git a/ImageViewerActivity.py b/ImageViewerActivity.py
index b72d617..91de299 100644
--- a/ImageViewerActivity.py
+++ b/ImageViewerActivity.py
@@ -93,13 +93,17 @@ class ImageViewerActivity(activity.Activity):
'tmp%i' % time.time())
os.link(file_path, tempfile)
-
- self.view.set_file_location(tempfile)
+ gobject.idle_add(self.__set_file_idle_cb, tempfile)
+
+ def __set_file_idle_cb(self, file_path):
+ self.view.set_file_location(file_path)
self.zoom = int(self.metadata.get('zoom', '0'))
if self.zoom > 0:
self.view.set_zoom(self.zoom)
+ return True
+
def write_file(self, file_path):
self.metadata['zoom'] = str(self.zoom)
}}}
--
Ticket URL: <http://dev.sugarlabs.org/ticket/486#comment:3>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list