projects
/
wxWidgets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97a8589
)
don't delete inexistent column indices in DeleteCols()
author
Vadim Zeitlin
<vadim@wxwidgets.org>
Fri, 16 Feb 2007 17:41:58 +0000
(17:41 +0000)
committer
Vadim Zeitlin
<vadim@wxwidgets.org>
Fri, 16 Feb 2007 17:41:58 +0000
(17:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44512
c3d73ce0
-8a6f-49c7-b76d-
6d57e0e08775
src/generic/grid.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/generic/grid.cpp
b/src/generic/grid.cpp
index e3436a823398ee3f85f040d84547b0fee945dd2c..4fe90672985d740bc244283dc3736f3c2abf9399 100644
(file)
--- a/
src/generic/grid.cpp
+++ b/
src/generic/grid.cpp
@@
-3648,7
+3648,12
@@
bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols )
if ( !m_colLabels.IsEmpty() )
{
- m_colLabels.RemoveAt( colID, numCols );
+ // m_colLabels stores just as many elements as it needs, e.g. if only
+ // the label of the first column had been set it would have only one
+ // element and not numCols, so account for it
+ int nToRm = m_colLabels.size() - colID;
+ if ( nToRm > 0 )
+ m_colLabels.RemoveAt( colID, nToRm );
}
for ( row = 0; row < curNumRows; row++ )