]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/property.cpp
Use correct array size for weekday names.
[wxWidgets.git] / src / propgrid / property.cpp
index bbd56c2a03132d0aef6edd890173cee76f56108d..325ebc094a7c8d1e9eed66aea7110f64c9acd41b 100644 (file)
@@ -108,7 +108,7 @@ void wxPGCellRenderer::DrawEditorValue( wxDC& dc, const wxRect& rect,
 
     if ( editor )
     {
-        wxRect rect2(rect); 
+        wxRect rect2(rect);
         rect2.x += xOffset;
         rect2.y += yOffset;
         rect2.height -= yOffset;
@@ -613,6 +613,15 @@ bool wxPGProperty::IsSomeParent( wxPGProperty* candidate ) const
     return false;
 }
 
+void wxPGProperty::SetName( const wxString& newName )
+{
+    wxPropertyGrid* pg = GetGrid();
+
+    if ( pg )
+        pg->SetPropertyName(this, newName);
+    else
+        DoSetName(newName);
+}
 
 wxString wxPGProperty::GetName() const
 {
@@ -712,7 +721,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column,
 /*
 wxString wxPGProperty::GetColumnText( unsigned int col, int choiceIndex ) const
 {
-    
+
     if ( col != 1 || choiceIndex == wxNOT_FOUND )
     {
         const wxPGCell& cell = GetCell(col);
@@ -818,7 +827,7 @@ void wxPGProperty::DoGenerateComposedValue( wxString& text,
                                             argFlags|wxPG_COMPOSITE_FRAGMENT);
             }
         }
+
         if ( childResults && curChild->GetChildCount() )
             (*childResults)[curChild->GetName()] = s;
 
@@ -1502,7 +1511,7 @@ const wxPGCell& wxPGProperty::GetCell( unsigned int column ) const
     return pg->GetPropertyDefaultCell();
 }
 
-wxPGCell& wxPGProperty::GetCell( unsigned int column )
+wxPGCell& wxPGProperty::GetOrCreateCell( unsigned int column )
 {
     EnsureCells(column);
     return m_cells[column];
@@ -2569,14 +2578,14 @@ int wxPropertyCategory::GetTextExtent( const wxWindow* wnd, const wxFont& font )
     if ( m_textExtent > 0 )
         return m_textExtent;
     int x = 0, y = 0;
-       ((wxWindow*)wnd)->GetTextExtent( m_label, &x, &y, 0, 0, &font );
+    ((wxWindow*)wnd)->GetTextExtent( m_label, &x, &y, 0, 0, &font );
     return x;
 }
 
 void wxPropertyCategory::CalculateTextExtent( wxWindow* wnd, const wxFont& font )
 {
     int x = 0, y = 0;
-       wnd->GetTextExtent( m_label, &x, &y, 0, 0, &font );
+    wnd->GetTextExtent( m_label, &x, &y, 0, 0, &font );
     m_textExtent = x;
 }