#486 closed defect (fixed)
The image opened is very small
Reported by: | erikos | Owned by: | sayamindu |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Imageviewer | Version: | 0.84.x |
Severity: | Blocker | Keywords: | r+ |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | New |
Description
- take a screenshot
- open it in Imageviewer
- it is very small
- is full canvas in Browse
Change History (7)
comment:1 Changed 14 years ago by erikos
- Version changed from Unspecified to 0.84.x
comment:2 Changed 14 years ago by erikos
- Bug Status changed from Unconfimed to New
- Milestone changed from Unspecified by Release Team to 0.84
comment:3 Changed 14 years ago 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)
comment:4 Changed 14 years ago by tomeu
- Keywords r? added
comment:5 Changed 14 years ago by sayamindu
- Keywords r+ added; r? removed
Patch looks good. Please commit.
comment:6 Changed 14 years ago by sayamindu
- Resolution set to fixed
- Status changed from new to closed
Ok, committed to master and cherry-picked to 0.84. Closing this. Thanks to Tomeu for stepping in and fixing this.
Note: See
TracTickets for help on using
tickets.
So the width and height of the canvas are reported to be very small. So the image is zoomed down to fit. It happens as well, only when opening the image directly - not when using the object chooser dialog.
Looks like introduced by #428