No changes, just fix indentation in wxDataViewMainWindow::Expand().

The code was indented two extra levels for some reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-11-06 16:51:41 +00:00
parent ed3aece5ae
commit 5d2ebe49df

View File

@@ -3085,44 +3085,44 @@ void wxDataViewMainWindow::Expand( unsigned int row )
if (!node->HasChildren()) if (!node->HasChildren())
return; return;
if (!node->IsOpen()) if (!node->IsOpen())
{ {
if ( !SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, node->GetItem()) ) if ( !SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, node->GetItem()) )
{ {
// Vetoed by the event handler. // Vetoed by the event handler.
return; return;
} }
node->ToggleOpen(); node->ToggleOpen();
// build the children of current node // build the children of current node
if( node->GetChildNodes().empty() ) if( node->GetChildNodes().empty() )
{ {
SortPrepare(); SortPrepare();
::BuildTreeHelper(GetModel(), node->GetItem(), node); ::BuildTreeHelper(GetModel(), node->GetItem(), node);
} }
// By expanding the node all row indices that are currently in the selection list // By expanding the node all row indices that are currently in the selection list
// and are greater than our node have become invalid. So we have to correct that now. // and are greater than our node have become invalid. So we have to correct that now.
const unsigned rowAdjustment = node->GetSubTreeCount(); const unsigned rowAdjustment = node->GetSubTreeCount();
for(unsigned i=0; i<m_selection.size(); ++i) for(unsigned i=0; i<m_selection.size(); ++i)
{ {
const unsigned testRow = m_selection[i]; const unsigned testRow = m_selection[i];
// all rows above us are not affected, so skip them // all rows above us are not affected, so skip them
if(testRow <= row) if(testRow <= row)
continue; continue;
m_selection[i] += rowAdjustment; m_selection[i] += rowAdjustment;
} }
if(m_currentRow > row) if(m_currentRow > row)
ChangeCurrentRow(m_currentRow + rowAdjustment); ChangeCurrentRow(m_currentRow + rowAdjustment);
m_count = -1; m_count = -1;
UpdateDisplay(); UpdateDisplay();
// Send the expanded event // Send the expanded event
SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED,node->GetItem()); SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED,node->GetItem());
} }
} }
void wxDataViewMainWindow::Collapse(unsigned int row) void wxDataViewMainWindow::Collapse(unsigned int row)