Resolve -Wmisleading-indentation warnings.
This commit is contained in:
@@ -227,7 +227,7 @@ void wxDataViewColumn::SetSortOrder(bool ascending)
|
|||||||
m_owner->UseColumnForSorting(idx);
|
m_owner->UseColumnForSorting(idx);
|
||||||
m_sort = true;
|
m_sort = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sortAscending = ascending;
|
m_sortAscending = ascending;
|
||||||
|
|
||||||
// Call this directly instead of using UpdateDisplay() as we already have
|
// Call this directly instead of using UpdateDisplay() as we already have
|
||||||
@@ -3381,42 +3381,42 @@ void wxDataViewMainWindow::Collapse(unsigned int row)
|
|||||||
if (!node->HasChildren())
|
if (!node->HasChildren())
|
||||||
return;
|
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;
|
||||||
// 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());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 )
|
wxDataViewTreeNode * wxDataViewMainWindow::FindNode( const wxDataViewItem & item )
|
||||||
|
@@ -1124,11 +1124,11 @@ bool wxRegKey::GetFirstValue(wxString& strValueName, long& lIndex)
|
|||||||
|
|
||||||
bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
|
bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
|
||||||
{
|
{
|
||||||
wxASSERT( IsOpened() );
|
wxASSERT( IsOpened() );
|
||||||
|
|
||||||
// are we already at the end of enumeration?
|
// are we already at the end of enumeration?
|
||||||
if ( lIndex == -1 )
|
if ( lIndex == -1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxChar szValueName[1024]; // @@ use RegQueryInfoKey...
|
wxChar szValueName[1024]; // @@ use RegQueryInfoKey...
|
||||||
DWORD dwValueLen = WXSIZEOF(szValueName);
|
DWORD dwValueLen = WXSIZEOF(szValueName);
|
||||||
|
@@ -1633,7 +1633,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const
|
|||||||
// it's a separator or there is no tool at all there
|
// it's a separator or there is no tool at all there
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return m_tools.Item((size_t)index)->GetData();
|
return m_tools.Item((size_t)index)->GetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::UpdateSize()
|
void wxToolBar::UpdateSize()
|
||||||
|
Reference in New Issue
Block a user