Fix sound_file.filelist_row after removing files

Bug #1139620 reported by Michael Schwendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SoundConverter
Fix Released
High
GautierPortet

Bug Description

This is for another traceback when starting conversion after removing files.

Steps to reproduce:
1. Add five files.
2. Select and remove the first four files.
3. Start conversion.

File "/usr/lib/soundconverter/python/soundconverter/ui.py", line xxxx, in set_file_progress
...
in set_row_progress
    if self.model[number][2] == 1.0:
IndexError: could not find tree path

The reason is that for each SoundFile, its filelist row number is stored within the SoundFile object as an initial filelist_row value when the file is added. When removing other files this initial row number gets out-of-date:

    def set_file_progress(self, sound_file, progress):
        row = sound_file.filelist_row
        self.filelist.set_row_progress(row, progress)

    def _append_file(self, sound_file):
        sound_file.filelist_row = len(self.model) - 1

Revision history for this message
Michael Schwendt (mschwendt) wrote :
Changed in soundconverter:
assignee: nobody → GautierPortet (kassoulet)
milestone: none → 2.0.5
importance: Undecided → High
status: New → In Progress
Revision history for this message
GautierPortet (kassoulet) wrote :

Patch applied.

Changed in soundconverter:
status: In Progress → Fix Committed
Changed in soundconverter:
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