From 52d3353ebd2b19319dcceb176bdd78e99ff79067 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 26 Oct 2018 18:48:56 +0000 Subject: do not lose first visible item after adding more tracks git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8399 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Ui/skinned/listwidget.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/plugins/Ui/skinned/listwidget.h') diff --git a/src/plugins/Ui/skinned/listwidget.h b/src/plugins/Ui/skinned/listwidget.h index 9e019d630..abaa5fec8 100644 --- a/src/plugins/Ui/skinned/listwidget.h +++ b/src/plugins/Ui/skinned/listwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2017 by Ilya Kotov * + * Copyright (C) 2006-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -109,18 +109,19 @@ private: * Returns string with queue number or(and) repeate flag for the item number \b i. */ const QString getExtraString(int i); - bool updateRowCount(); + void restoreFirstVisible(); bool m_update; int m_pressed_index; QMenu *m_menu; PlayListModel *m_model; - int m_row_count, m_first; + int m_row_count, m_first, m_count; //visible rows, first visible index, total item count + PlayListItem *m_firstItem; //first visible item Skin *m_skin; int m_anchor_index; /*! - * Scroll direction that is preforming in current moment. + * Scroll direction that is performing in current moment. */ ScrollDirection m_scroll_direction; int m_prev_y; -- cgit v1.2.3-13-gbd6f