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

已查看 18 次
跳至第一个未读帖子

Matěj Cepl

未读,
2013年10月26日 17:50:402013/10/26
收件人 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

未读,
2013年11月28日 14:02:102013/11/28
收件人 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
回复全部
回复作者
转发
0 个新帖子