Added support for grids with m_numRows=0. SelectRow(i,TRUE) now sets
ControlDown to TRUE in the generated event. Fixed stupid bug in row/column deletion in griddemo.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -497,9 +497,11 @@ void GridFrame::DeleteSelectedRows( wxCommandEvent& WXUNUSED(ev) )
|
||||
{
|
||||
if ( grid->IsSelection() )
|
||||
{
|
||||
for ( int n = 0; n < grid->GetNumberRows(); n++ )
|
||||
for ( int n = 0; n < grid->GetNumberRows(); )
|
||||
if ( grid->IsInSelection( n , 0 ) )
|
||||
grid->DeleteRows( n, 1 );
|
||||
else
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,9 +510,11 @@ void GridFrame::DeleteSelectedCols( wxCommandEvent& WXUNUSED(ev) )
|
||||
{
|
||||
if ( grid->IsSelection() )
|
||||
{
|
||||
for ( int n = 0; n < grid->GetNumberCols(); n++ )
|
||||
for ( int n = 0; n < grid->GetNumberCols(); )
|
||||
if ( grid->IsInSelection( 0 , n ) )
|
||||
grid->DeleteCols( n, 1 );
|
||||
else
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user