[PATCH] Don't try to work with images in empty folder.

18 views
Skip to first unread message

Matěj Cepl

unread,
Oct 26, 2013, 5:50:40 PM10/26/13
to jbr...@googlegroups.com, Matěj Cepl
When the last image is removed from the folder, jbrout tries to reselect
images there and catches to the void.

Unless there is a commotion against this simple patch, I will merge it
to the trunk after this following Friday.

Signed-off-by: Matěj Cepl <mc...@redhat.com>
---
jbrout/jbrout.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/jbrout/jbrout.py b/jbrout/jbrout.py
index 09a8f62..105c3c1 100755
--- a/jbrout/jbrout.py
+++ b/jbrout/jbrout.py
@@ -2004,7 +2004,8 @@ class Window(GladeApp):
if w.selected: # perhaps a new desired selection
sel = self.tbl.setSelected(w.selected)
else:
- sel = self.tbl.setSelected([self.tbl.items[w.idx]])
+ if self.tbl.items:
+ sel = self.tbl.setSelected([self.tbl.items[w.idx]])

if w.isBasketUpdate: #is basket updated ?
model = self.treeviewdb.get_model()
--
1.8.4.1.600.g3d092bf

Matěj Cepl

unread,
Nov 28, 2013, 2:02:10 PM11/28/13
to jbr...@googlegroups.com
On 26/10/13 23:50, Matěj Cepl wrote:
> When the last image is removed from the folder, jbrout tries to reselect
> images there and catches to the void.
>
> Unless there is a commotion against this simple patch, I will merge it
> to the trunk after this following Friday.

Done

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

Never, never, never believe any war will be smooth and easy, or
that anyone who embarks on the strange voyage can measure the
tides and hurricanes he will encounter. The statesman who yields
to war fever must realise that once the signal is given, he is no
longer the master of policy but the slave of unforeseeable and
uncontrollable events.
-- Winston Churchill, 1930

signature.asc
Reply all
Reply to author
Forward
0 new messages