Properties: no active row, get_cursor returns None, causing error

Bug #570713 reported by Johannes Sasongko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Medium
Johannes Sasongko

Bug Description

The track properties dialog calls gtk.TreeView.get_cursor to find the "active" row. The intention was to show this track first in the dialog, although I think that feature never got implemented.

The problem is, get_cursor can return None, and this is not handled. To reproduce:
1. Create new playlist view.
2. Drag a track to it.
3. Press the Next button, the track should start playing.
4. Tools → Track Properties.

If you don't see the error, try restarting Exaile. For some reason it doesn't happen all the time.

Traceback (most recent call last):
  File "C:\Users\js\Projects\exaile\trunk\xlgui\__init__.py", line 366, in on_track_properties
    if not pl.properties_dialog():
  File "C:\Users\js\Projects\exaile\trunk\xlgui\playlist.py", line 136, in properties_dialog
    selected = self.get_cursor()
  File "C:\Users\js\Projects\exaile\trunk\xlgui\playlist.py", line 425, in get_cursor
    track_id = self.list.get_cursor()[0][0]
TypeError: 'NoneType' object is unsubscriptable

Related branches

Changed in exaile:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Fixed. get_cursor was returning (None, None).

Changed in exaile:
assignee: nobody → Johannes Sasongko (sjohannes)
milestone: none → 0.3.2
status: Confirmed → Fix Committed
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.