diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-03-07 18:46:35 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-03-07 18:46:35 +0000 |
| commit | 35d67466e4c9496f23a4f9ca43320f98d17edd26 (patch) | |
| tree | 9014f8d41c1028643b38c4c17092f976aea1ee3d /src/qmmpui/columnmanager.cpp | |
| parent | dea812e69d02f444e906ea28204b206b666a72f7 (diff) | |
| download | qmmp-35d67466e4c9496f23a4f9ca43320f98d17edd26.tar.gz qmmp-35d67466e4c9496f23a4f9ca43320f98d17edd26.tar.bz2 qmmp-35d67466e4c9496f23a4f9ca43320f98d17edd26.zip | |
fixed some bugs
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4766 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/columnmanager.cpp')
| -rw-r--r-- | src/qmmpui/columnmanager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qmmpui/columnmanager.cpp b/src/qmmpui/columnmanager.cpp index 331a8445c..f5ba0054e 100644 --- a/src/qmmpui/columnmanager.cpp +++ b/src/qmmpui/columnmanager.cpp @@ -27,7 +27,7 @@ ColumnManager::ColumnManager(QObject *parent) : { QSettings s (Qmmp::configFile(), QSettings::IniFormat); s.beginGroup("PlayList"); - int c = s.value("column_count", 1).toInt(); + int c = qMax(1, s.value("column_count", 1).toInt()); for(int i = 0; i < c; ++i) { s.beginGroup(QString("column%1").arg(i)); @@ -72,6 +72,9 @@ void ColumnManager::remove(int index) if(index < 0 || index >= m_columns.size()) qWarning("ColumnManager: index is out of range"); + if(m_columns.count() == 1) + return; + delete m_columns.takeAt(index).titleFormatter; sync(); emit removed(index); |
