[Dev] Re: [commits] (davids) [7895] Fix for Bug 4157 (wxMac-only)

John Anderson john at osafoundation.org
Mon Oct 17 11:57:43 PDT 2005


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

commits at osafoundation.org wrote:

> Revision
>     7895 <http://viewcvs.osafoundation.org/chandler?view=rev&rev=7895>
> Author
>     davids
> Date
>     2005-10-16 10:45:41 -0700 (Sun, 16 Oct 2005)
>
>
>       Log Message
>
> Fix for Bug 4157 
> <http://bugzilla.osafoundation.org/show_bug.cgi?id=4157> (wxMac-only)
>
>
>       Modified Paths
>
>     * trunk/internal/wx/src/generic/gridsel.cpp
>       <#trunkinternalwxsrcgenericgridselcpp>
>
>
>       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
>Commits at osafoundation.org
>http://lists.osafoundation.org/mailman/listinfo/commits
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/dev/attachments/20051017/776f3250/attachment.htm


More information about the Dev mailing list