diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-07-15 07:23:11 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-07-15 07:23:11 +0000 |
| commit | 215a0d9e8acf82af59f825fa3ce28c9394257bad (patch) | |
| tree | 3d8eb97d5aac9c019399ff82f63369e00acd0e11 /src/qmmpui/playlistmodel.cpp | |
| parent | 49e0e2887627f29d5c46e2d6dbf064de23c9cf8a (diff) | |
| download | qmmp-215a0d9e8acf82af59f825fa3ce28c9394257bad.tar.gz qmmp-215a0d9e8acf82af59f825fa3ce28c9394257bad.tar.bz2 qmmp-215a0d9e8acf82af59f825fa3ce28c9394257bad.zip | |
fixed freezing when shift+home and shift+end pressed
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4375 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistmodel.cpp')
| -rw-r--r-- | src/qmmpui/playlistmodel.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index 62a5003e6..b3118c62c 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -421,6 +421,23 @@ void PlayListModel::setSelected(QList<PlayListItem *> items, bool selected) emit listChanged(); } +void PlayListModel::setSelected(int first, int last, bool selected) +{ + if(first > last) + { + setSelected(last, first, selected); + return; + } + for(int index = first; index <= last; ++index) + { + PlayListItem *i = item(index); + if(!i) + continue; + i->setSelected(selected); + } + emit listChanged(); +} + void PlayListModel::removeSelected() { removeSelection(false); |
