From dcf5fe856f99abfffdfd29f47cc11b10c41b8216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Mon, 17 Oct 2011 14:20:53 +0000 Subject: [PATCH] 3145: improve image subsection, bug with filtered objects (patch by Robert Cheramy) svn: r18341 --- src/gui/editors/editmediaref.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/editors/editmediaref.py b/src/gui/editors/editmediaref.py index 124ab6f6e..2694ba50c 100644 --- a/src/gui/editors/editmediaref.py +++ b/src/gui/editors/editmediaref.py @@ -99,6 +99,7 @@ class EditMediaRef(EditReference): self.primtab = RefTab(self.dbstate, self.uistate, self.track, _('_General'), tblref) self.track_ref_for_deletion("primtab") + self.rect_pixbuf = None def setup_filepath(self): self.select = self.top.get_object('file_select') @@ -478,6 +479,8 @@ class EditMediaRef(EditReference): self.corner2_y_spinbutton.set_value(100) else: + if (self.rect_pixbuf == None): + return self.subpixmap.set_from_pixbuf(self.rect_pixbuf) # ensure the clicks happened at least 5 pixels away from each other @@ -542,6 +545,9 @@ class EditMediaRef(EditReference): self.corner2_x_spinbutton.set_value(new_x2) self.corner2_y_spinbutton.set_value(new_y2) + # Free the pixbuf as it is not needed anymore + self.rect_pixbuf = None + def _update_addmedia(self, obj): """ Called when the add media dialog has been called.