Hi David:

As an alternative to just commenting out the Update code, which will just leave future readers of scratching their head, it would be better to understand why the code was added in the first place to see if instead we can remove it.  According to CVS, RD (Robin Dunn?) added the Updates on 4/21/05 in revision 1.21. Was it to fix a bug for us? At the very least adding a comment would help.

John

[email protected] wrote:
[commits] (davids) [7895] Fix for Bug 4157 (wxMac-only)
Revision
7895
Author
davids
Date
2005-10-16 10:45:41 -0700 (Sun, 16 Oct 2005)

Log Message

Fix for Bug 4157 (wxMac-only)

Modified Paths

Diff

Modified: trunk/internal/wx/src/generic/gridsel.cpp (7894 => 7895)

--- trunk/internal/wx/src/generic/gridsel.cpp	2005-10-15 02:15:30 UTC (rev 7894)
+++ trunk/internal/wx/src/generic/gridsel.cpp	2005-10-16 17:45:41 UTC (rev 7895)
@@ -800,10 +800,10 @@
     wxRect r;
     wxGridCellCoords coords1, coords2;
 
-    // deselect all invidiual cells and update the screen
+    // deselect all individual cells and update the screen
     if ( m_selectionMode == wxGrid::wxGridSelectCells )
     {
-        while( ( n = m_cellSelection.GetCount() ) > 0)
+        while ( ( n = m_cellSelection.GetCount() ) > 0)
         {
             n--;
             coords1 = m_cellSelection[n];
@@ -812,15 +812,16 @@
             {
                 r = m_grid->BlockToDeviceRect( coords1, coords1 );
                 ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
+
 #ifdef __WXMAC__
-                ((wxWindow *)m_grid->m_gridWin)->Update();
+//                ((wxWindow *)m_grid->m_gridWin)->Update();
 #endif
             }
         }
     }
 
     // deselect all blocks and update the screen
-    while( ( n = m_blockSelectionTopLeft.GetCount() ) > 0)
+    while ( ( n = m_blockSelectionTopLeft.GetCount() ) > 0)
     {
         n--;
         coords1 = m_blockSelectionTopLeft[n];
@@ -831,8 +832,9 @@
         {
             r = m_grid->BlockToDeviceRect( coords1, coords2 );
             ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
+
 #ifdef __WXMAC__
-            ((wxWindow *)m_grid->m_gridWin)->Update();
+//            ((wxWindow *)m_grid->m_gridWin)->Update();
 #endif
         }
     }
@@ -840,7 +842,7 @@
     // deselect all rows and update the screen
     if ( m_selectionMode != wxGrid::wxGridSelectColumns )
     {
-        while( ( n = m_rowSelection.GetCount() ) > 0)
+        while ( ( n = m_rowSelection.GetCount() ) > 0)
         {
             n--;
             int row = m_rowSelection[n];
@@ -850,8 +852,9 @@
                 r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, 0 ),
                                                wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) );
                 ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
+
 #ifdef __WXMAC__
-                ((wxWindow *)m_grid->m_gridWin)->Update();
+//                ((wxWindow *)m_grid->m_gridWin)->Update();
 #endif
             }
         }
@@ -860,7 +863,7 @@
     // deselect all columns and update the screen
     if ( m_selectionMode != wxGrid::wxGridSelectRows )
     {
-        while( ( n = m_colSelection.GetCount() ) > 0)
+        while ( ( n = m_colSelection.GetCount() ) > 0)
         {
             n--;
             int col = m_colSelection[n];
@@ -870,8 +873,9 @@
                 r = m_grid->BlockToDeviceRect( wxGridCellCoords( 0, col ),
                                                wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) );
                 ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
+
 #ifdef __WXMAC__
-                ((wxWindow *)m_grid->m_gridWin)->Update();
+//                ((wxWindow *)m_grid->m_gridWin)->Update();
 #endif
             }
         }

  

_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

Reply via email to