From 2f739099ae8f76c957d58a0df789ec3354439c21 Mon Sep 17 00:00:00 2001
From: Gonzalo Odiard <godiard@gmail.com>
Date: Fri, 5 Jul 2013 10:10:35 -0300
Subject: [PATCH] Avoid error opening the image with the object chooser - SL
#4540
read_file do not open the file if _object_id is not set.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
---
ImageViewerActivity.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/ImageViewerActivity.py b/ImageViewerActivity.py
index e216850..53f8d84 100644
a
|
b
|
class ImageViewerActivity(activity.Activity): |
353 | 353 | if result == Gtk.ResponseType.ACCEPT: |
354 | 354 | jobject = chooser.get_selected_object() |
355 | 355 | if jobject and jobject.file_path: |
| 356 | self._object_id = jobject.object_id |
356 | 357 | self.read_file(jobject.file_path) |
357 | 358 | self.set_canvas(self.scrolled_window) |
358 | 359 | self.scrolled_window.show() |