simplified the code in ProcessGridCellMouseEvent() to get rid of unreachable code (coverity checked CID 3)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-07 22:53:10 +00:00
parent af5c81b3fa
commit 91894db3d7

View File

@@ -5836,16 +5836,8 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
if ( CanDragRowSize() && CanDragGridSize() ) if ( CanDragRowSize() && CanDragGridSize() )
ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW); ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW);
} }
if ( dragCol >= 0 )
{
m_dragRowOrCol = dragCol;
} }
else if ( dragCol >= 0 )
return;
}
if ( dragCol >= 0 )
{ {
m_dragRowOrCol = dragCol; m_dragRowOrCol = dragCol;
@@ -5854,17 +5846,15 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
if ( CanDragColSize() && CanDragGridSize() ) if ( CanDragColSize() && CanDragGridSize() )
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL); ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL);
} }
return;
} }
else // Neither on a row or col edge
// Neither on a row or col edge {
//
if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL ) if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL )
{ {
ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL); ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL);
} }
} }
}
} }