Resolve -Wmisleading-indentation warnings.

This commit is contained in:
Maarten Bent 2016-12-14 20:23:21 +01:00
parent e8207c8c59
commit f6f72449fe
3 changed files with 40 additions and 40 deletions

View File

@ -227,7 +227,7 @@ void wxDataViewColumn::SetSortOrder(bool ascending)
m_owner->UseColumnForSorting(idx);
m_sort = true;
}
m_sortAscending = ascending;
// Call this directly instead of using UpdateDisplay() as we already have
@ -3381,42 +3381,42 @@ void wxDataViewMainWindow::Collapse(unsigned int row)
if (!node->HasChildren())
return;
if (node->IsOpen())
if (node->IsOpen())
{
if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSING,node->GetItem()) )
{
if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSING,node->GetItem()) )
{
// Vetoed by the event handler.
return;
}
const unsigned countDeletedRows = node->GetSubTreeCount();
if ( m_selection.OnItemsDeleted(row + 1, countDeletedRows) )
{
SendSelectionChangedEvent(GetItemByRow(row));
}
node->ToggleOpen();
// Adjust the current row if necessary.
if ( m_currentRow > row )
{
// If the current row was among the collapsed items, make the
// parent itself current.
if ( m_currentRow <= row + countDeletedRows )
ChangeCurrentRow(row);
else // Otherwise just update the index.
ChangeCurrentRow(m_currentRow - countDeletedRows);
}
if ( m_count != -1 )
m_count -= countDeletedRows;
GetOwner()->InvalidateColBestWidths();
UpdateDisplay();
SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSED,node->GetItem());
// Vetoed by the event handler.
return;
}
const unsigned countDeletedRows = node->GetSubTreeCount();
if ( m_selection.OnItemsDeleted(row + 1, countDeletedRows) )
{
SendSelectionChangedEvent(GetItemByRow(row));
}
node->ToggleOpen();
// Adjust the current row if necessary.
if ( m_currentRow > row )
{
// If the current row was among the collapsed items, make the
// parent itself current.
if ( m_currentRow <= row + countDeletedRows )
ChangeCurrentRow(row);
else // Otherwise just update the index.
ChangeCurrentRow(m_currentRow - countDeletedRows);
}
if ( m_count != -1 )
m_count -= countDeletedRows;
GetOwner()->InvalidateColBestWidths();
UpdateDisplay();
SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSED,node->GetItem());
}
}
wxDataViewTreeNode * wxDataViewMainWindow::FindNode( const wxDataViewItem & item )

View File

@ -1124,11 +1124,11 @@ bool wxRegKey::GetFirstValue(wxString& strValueName, long& lIndex)
bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
{
wxASSERT( IsOpened() );
wxASSERT( IsOpened() );
// are we already at the end of enumeration?
if ( lIndex == -1 )
return false;
// are we already at the end of enumeration?
if ( lIndex == -1 )
return false;
wxChar szValueName[1024]; // @@ use RegQueryInfoKey...
DWORD dwValueLen = WXSIZEOF(szValueName);

View File

@ -1633,7 +1633,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const
// it's a separator or there is no tool at all there
return NULL;
return m_tools.Item((size_t)index)->GetData();
return m_tools.Item((size_t)index)->GetData();
}
void wxToolBar::UpdateSize()