]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Applied patch to avoid g_lib wanrings.
[wxWidgets.git] / src / generic / grid.cpp
index a07c8edb21e1d07da390ac3b09df35258f910a00..b712c67c1d66efbf67dd9807088f3cb35f4ba30a 100644 (file)
@@ -1461,12 +1461,12 @@ bool wxGridCellChoiceEditor::EndEdit(int row, int col,
                                      wxGrid* grid)
 {
     wxString value = Combo()->GetValue();
-    bool changed = value != m_startValue;
+    if ( value == m_startValue )
+        return false;
 
-    if ( changed )
-        grid->GetTable()->SetValue(row, col, value);
+    grid->GetTable()->SetValue(row, col, value);
 
-    return changed;
+    return true;
 }
 
 void wxGridCellChoiceEditor::Reset()
@@ -3849,15 +3849,8 @@ wxGrid::wxGrid( wxWindow *parent,
     m_colMinWidths(GRID_HASH_SIZE),
     m_rowMinHeights(GRID_HASH_SIZE)
 {
-    // in order to make sure that a size event is not
-    // trigerred in a unfinished state
-    m_cornerLabelWin = NULL ;
-    m_rowLabelWin = NULL ;
-    m_colLabelWin = NULL ;
-    m_gridWin = NULL ;
-
-    SetBestFittingSize(size);
     Create();
+    SetBestFittingSize(size);
 }
 
 bool wxGrid::Create(wxWindow *parent, wxWindowID id,
@@ -3871,8 +3864,8 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
     m_colMinWidths = wxLongToLongHashMap(GRID_HASH_SIZE) ;
     m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE) ;
 
-    SetBestFittingSize(size);
     Create() ;
+    SetBestFittingSize(size);
 
     return true;
 }