Mercurial > hg > svcore
diff data/model/EditableDenseThreeDimensionalModel.cpp @ 942:0009b2b066e0
Merge
author | Chris Cannam |
---|---|
date | Wed, 02 Jul 2014 08:42:33 +0100 |
parents | 3be40cf40c49 5bd05a24e32a |
children | cc27f35aa75c |
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.cpp Wed Jul 02 08:42:11 2014 +0100 +++ b/data/model/EditableDenseThreeDimensionalModel.cpp Wed Jul 02 08:42:33 2014 +0100 @@ -157,7 +157,7 @@ EditableDenseThreeDimensionalModel::getColumn(int index) const { QReadLocker locker(&m_lock); - if (int(index) >= m_data.size()) return Column(); + if (index < 0 || index >= m_data.size()) return Column(); return expandAndRetrieve(index); } @@ -390,7 +390,7 @@ QString EditableDenseThreeDimensionalModel::getBinName(int n) const { - if ((int)m_binNames.size() > n) return m_binNames[n]; + if (n >= 0 && (int)m_binNames.size() > n) return m_binNames[n]; else return ""; }