diff options
Diffstat (limited to 'src/plugins/Ui/skinned/listwidget.cpp')
| -rw-r--r-- | src/plugins/Ui/skinned/listwidget.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/plugins/Ui/skinned/listwidget.cpp b/src/plugins/Ui/skinned/listwidget.cpp index c324eda66..0f6c9bf89 100644 --- a/src/plugins/Ui/skinned/listwidget.cpp +++ b/src/plugins/Ui/skinned/listwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2013 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -333,21 +333,7 @@ void ListWidget::mousePressEvent(QMouseEvent *e) if ((Qt::ShiftModifier & e->modifiers())) { - bool select = true; - if (m_pressed_index > m_anchor_index) - { - for (int j = m_anchor_index;j <= m_pressed_index;j++) - { - m_model->setSelected(j, select); - } - } - else - { - for (int j = m_anchor_index;j >= m_pressed_index;j--) - { - m_model->setSelected(j, select); - } - } + m_model->setSelected(m_pressed_index, m_anchor_index, true); m_anchor_index = m_pressed_index; } else //ShiftModifier released @@ -516,7 +502,7 @@ void ListWidget::setModel(PlayListModel *selected, PlayListModel *previous) recenterCurrent(); updateList(); connect (m_model, SIGNAL(currentChanged()), SLOT(recenterCurrent())); - connect (m_model, SIGNAL(listChanged()), SLOT(updateList())); + connect (m_model, SIGNAL(listChanged(int)), SLOT(updateList())); } void ListWidget::scroll(int sc) |
