]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
translate the descriptions in SetDesc(wxCmdLineEntryDesc)
[wxWidgets.git] / src / generic / grid.cpp
index 3cd1e3307da0376d95bcda847b45df33168cdbdf..adace082480fe74899494c42ae2ef3bfb57edfb8 100644 (file)
@@ -10537,6 +10537,12 @@ wxGrid::AutoSizeColOrRow(int colOrRow, bool setAsMin, wxGridDirection direction)
 
     if ( column )
     {
+        // Ensure automatic width is not less than minimal width. See the
+        // comment in SetColSize() for explanation of why this isn't done
+        // in SetColSize().
+        if ( !setAsMin )
+            extentMax = wxMax(extentMax, GetColMinimalWidth(col));
+
         SetColSize( col, extentMax );
         if ( !GetBatchCount() )
         {
@@ -10552,6 +10558,12 @@ wxGrid::AutoSizeColOrRow(int colOrRow, bool setAsMin, wxGridDirection direction)
     }
     else
     {
+        // Ensure automatic width is not less than minimal height. See the
+        // comment in SetColSize() for explanation of why this isn't done
+        // in SetRowSize().
+        if ( !setAsMin )
+            extentMax = wxMax(extentMax, GetRowMinimalHeight(row));
+
         SetRowSize(row, extentMax);
         if ( !GetBatchCount() )
         {