Changeset 267:a4e5f3f529d7


Ignore:
Timestamp:
07/01/12 17:22:06 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

If at least one row is selected, the lowermost one is used to get the starting value from

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/callouts.py

    r266 r267  
    345345            return 2500 if descending else 10
    346346        else:
    347             lastIter = model.iter_nth_child(None, numEntries-1)
    348             lastValue = model.get_value(lastIter, 0)
    349 
    350             altitude = self._getNextValidUsualAltitude(lastValue, descending)
     347            selection = self._fileList.get_selection()
     348            (_model, paths) = selection.get_selected_rows()
     349
     350            if paths:
     351                startIter = model.get_iter(max(paths))
     352            else:
     353                startIter = model.iter_nth_child(None, numEntries-1)
     354
     355            startValue = model.get_value(startIter, 0)
     356
     357            altitude = self._getNextValidUsualAltitude(startValue, descending)
    351358            if altitude is None:
    352                 altitude = self._getNextValidUsualAltitude(lastValue,
     359                altitude = self._getNextValidUsualAltitude(startValue,
    353360                                                           not descending)
    354361
Note: See TracChangeset for help on using the changeset viewer.