aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Ui')
-rw-r--r--src/plugins/Ui/skinned/listwidget.cpp12
-rw-r--r--src/plugins/Ui/skinned/listwidget.h1
-rw-r--r--src/plugins/Ui/skinned/playlistheader.cpp3
3 files changed, 11 insertions, 5 deletions
diff --git a/src/plugins/Ui/skinned/listwidget.cpp b/src/plugins/Ui/skinned/listwidget.cpp
index b68614dcd..7eeb572e8 100644
--- a/src/plugins/Ui/skinned/listwidget.cpp
+++ b/src/plugins/Ui/skinned/listwidget.cpp
@@ -53,6 +53,7 @@ ListWidget::ListWidget(QWidget *parent)
m_popupWidget = 0;
m_header = 0;
m_update = false;
+ m_resize = false;
m_drop_index = INVALID_INDEX;
m_scroll_direction = NONE;
m_prev_y = 0;
@@ -69,11 +70,7 @@ ListWidget::ListWidget(QWidget *parent)
connect(m_skin, SIGNAL(skinChanged()), SLOT(updateSkin()));
connect(m_ui_settings, SIGNAL(repeatableTrackChanged(bool)), SLOT(updateRepeatIndicator()));
connect(m_timer, SIGNAL(timeout()), SLOT(autoscroll()));
- connect(headerModel, SIGNAL(changed(int)), SLOT(updateColumns()));
- connect(headerModel, SIGNAL(resized(int)), SLOT(updateColumns()));
- connect(headerModel, SIGNAL(inserted(int)), SLOT(updateColumns()));
- connect(headerModel, SIGNAL(removed(int)), SLOT(updateColumns()));
- connect(headerModel, SIGNAL(moved(int, int)), SLOT(updateColumns()));
+ connect(headerModel, SIGNAL(headerChanged()), SLOT(updateColumns()));
}
ListWidget::~ListWidget()
@@ -262,7 +259,9 @@ void ListWidget::mousePressEvent(QMouseEvent *e)
void ListWidget::resizeEvent(QResizeEvent *e)
{
+ m_resize = true;
m_header->setGeometry(0,0,width(), m_drawer.rowHeight());
+ m_resize = false;
m_row_count = (e->size().height() - (m_header ? m_header->height() : 0)) / m_drawer.rowHeight();
updateList(PlayListModel::STRUCTURE);
QWidget::resizeEvent(e);
@@ -397,6 +396,9 @@ void ListWidget::updateList(int flags)
void ListWidget::updateColumns()
{
+ if(m_resize) //do no update while resize event
+ return;
+
m_header->updateColumns();
QList<PlayListItem *> items = m_model->mid(m_first, m_row_count);
for(int i = 0; i < items.count(); ++i)
diff --git a/src/plugins/Ui/skinned/listwidget.h b/src/plugins/Ui/skinned/listwidget.h
index e236768f1..dd1c5a28f 100644
--- a/src/plugins/Ui/skinned/listwidget.h
+++ b/src/plugins/Ui/skinned/listwidget.h
@@ -115,6 +115,7 @@ private:
PlayListModel *m_model;
int m_row_count, m_first;
Skin *m_skin;
+ bool m_resize;
int m_anchor_index;
/*!
* Scroll direction that is preforming in current moment.
diff --git a/src/plugins/Ui/skinned/playlistheader.cpp b/src/plugins/Ui/skinned/playlistheader.cpp
index 1f80a34e2..212e7028a 100644
--- a/src/plugins/Ui/skinned/playlistheader.cpp
+++ b/src/plugins/Ui/skinned/playlistheader.cpp
@@ -262,7 +262,10 @@ void PlayListHeader::resizeEvent(QResizeEvent *e)
int delta = e->size().width() - e->oldSize().width();
int index = m_model->autoResizeColumn();
if(index >= 0)
+ {
m_model->resize(index, m_model->size(index) + delta);
+ updateColumns();
+ }
}
void PlayListHeader::contextMenuEvent(QContextMenuEvent *e)