Fix crash when editing wxDVC items in place in wxOSX/Cocoa.

NSOutlineView::editedColumn: and editedRow: return -1 when they are called
from textDidEndEditing so we need to store their values in textDidBeginEditing
and reuse them later.

This fixes the crash in the sample with out-of-range array index exception
which happened whenever a cell was edited.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-17 01:04:13 +00:00
parent c937bcac0f
commit f32eb96401
2 changed files with 27 additions and 12 deletions

View File

@@ -418,7 +418,9 @@ private:
@interface wxCocoaOutlineView : NSOutlineView
{
@private
BOOL isEditingCell; // flag indicating if a cell is currently being edited
// column and row of the cell being edited or -1 if none
int currentlyEditedColumn,
currentlyEditedRow;
wxCocoaDataViewControl* implementation;
}