peircej / jbrout

Automatically exported from code.google.com/p/jbrout
0 stars 0 forks source link

JBrout 0.3.284 throws an error on double-clicking on the thumbnail panel when no albums are present #151

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
On a brand new installation of JBrout 0.3.284:
1. Start JBrout
2. With an empty album list double click on the thumbnail pane

What is the expected output? What do you see instead?
No error should be generated. Instead of that a dialog pops up about a 
traceback exception in python:
"Traceback (most recent call last):
   File "/usr/lib/jbrout/jbrout.py", line 1710, in on_selecteur_mouseClick
    self.call_winshow(self.tbl.items, self.tbl.items.index(self.tbl.getSelected()[-1]), self.tbl.getSelected())
 IndexError: list index out of range" 

What version of the product are you using? On what operating system?
JBrout 0.3.284 on GNU/Linux Ubuntu 10.04 64 bit "Lucid Lynx".

Please provide any additional information below.
exiftran 2.07-2
libimage-exiftool-perl 7.89-1
python 2.6.5-0ubuntu1
python-glade2 2.17.0-0ubuntu2
python-gtk2 2.17.0-0ubuntu2
python-imaging 1.1.7-1
python-lxml 2.2.4-1
python-pyexiv2 0.1.3-6build1

Original issue reported on code.google.com by hristo.e...@gmail.com on 29 Jun 2010 at 1:51

Attachments:

GoogleCodeExporter commented 8 years ago
I found a way to fix it, hoping that's the way to do it.
In jbrout.py, put a try/catch block on the line 1753

            try:
                self.call_winshow(self.tbl.items, self.tbl.items.index(self.tbl.getSelected()[-1]), self.tbl.getSelected())
            except:
                pass

Original comment by p...@gmx.fr on 29 Oct 2010 at 10:57

GoogleCodeExporter commented 8 years ago
Double clicking on any empty thumbnail pane will trigger this bug and it may be 
possible to double click in the thumbnail pane without making a selection as 
well.  

A better way to resolve this than simply catching  the exception which may hide 
all sorts of other nasties is to check that the length of the current selection 
is not zero.  

Original comment by r...@wallace.gen.nz on 8 Jan 2011 at 9:23

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r325.

Original comment by r...@wallace.gen.nz on 8 Jan 2011 at 9:28