]> git.saurik.com Git - wxWidgets.git/commitdiff
Reverted mistaken check-in
authorRobin Dunn <robin@alldunn.com>
Thu, 18 May 2006 01:52:55 +0000 (01:52 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 18 May 2006 01:52:55 +0000 (01:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/listctrl/listtest.cpp
samples/toolbar/toolbar.cpp
src/generic/grid.cpp

index f55f7440b0219fe07050603287bdada6b77e6a4e..116212c3bf1b1355bfda8446a1f65915014fca8d 100644 (file)
@@ -516,9 +516,9 @@ void MyFrame::InitWithIconItems(bool withText, bool sameIcon)
     m_listCtrl->SetImageList(m_imageListNormal, wxIMAGE_LIST_NORMAL);
     m_listCtrl->SetImageList(m_imageListSmall, wxIMAGE_LIST_SMALL);
 
-    for ( int i = 0; i < NUM_ICONS*20; i++ )
+    for ( int i = 0; i < NUM_ICONS; i++ )
     {
-        int image = i % (NUM_ICONS);
+        int image = sameIcon ? 0 : i;
 
         if ( withText )
         {
index a841af51734c91ac0a6c5c6f1279c35178a5dcca..e7a02de3166011abe0bf9c811257557e2b6d2f87 100644 (file)
@@ -679,10 +679,6 @@ void MyFrame::OnToolLeftClick(wxCommandEvent& event)
     {
         DoDeletePrint();
     }
-    if (event.GetId() == IDM_TOOLBAR_OTHER_1)
-    {
-        m_tbar->Realize();
-    }
 }
 
 void MyFrame::OnToolRightClick(wxCommandEvent& event)
index 6293c3cd9958981491067b60b5c44f9e5796965f..81140534de100c8c084fb3f4af86ddbbca9c71d3 100644 (file)
@@ -7957,24 +7957,23 @@ void wxGrid::ShowCellEditControl()
 
             editor->SetCellAttr( attr );
             editor->SetSize( rect );
-            if (nXMove != 0)
-                editor->GetControl()->Move(
-                    editor->GetControl()->GetPosition().x + nXMove,
-                    editor->GetControl()->GetPosition().y );
+            editor->GetControl()->Move(
+                editor->GetControl()->GetPosition().x + nXMove,
+                editor->GetControl()->GetPosition().y );
             editor->Show( true, attr );
 
-            int colXPos = GetColLeft(col);
-//            for (int i = 0; i < m_currentCellCoords.GetCol(); i++)
-//            {
-//                colXPos += GetColSize( i );
-//            }
-
-//             int xUnit = 1, yUnit = 1;
-//             GetScrollPixelsPerUnit( &xUnit, &yUnit );
-//             if (col != 0)
-//                 Scroll( colXPos / xUnit - 1, GetScrollPos( wxVERTICAL ) );
-//             else
-//                 Scroll( colXPos / xUnit, GetScrollPos( wxVERTICAL ) );
+            int colXPos = 0;
+            for (int i = 0; i < m_currentCellCoords.GetCol(); i++)
+            {
+                colXPos += GetColSize( i );
+            }
+
+            int xUnit = 1, yUnit = 1;
+            GetScrollPixelsPerUnit( &xUnit, &yUnit );
+            if (m_currentCellCoords.GetCol() != 0)
+                Scroll( colXPos / xUnit - 1, GetScrollPos( wxVERTICAL ) );
+            else
+                Scroll( colXPos / xUnit, GetScrollPos( wxVERTICAL ) );
 
             // recalc dimensions in case we need to
             // expand the scrolled window to account for editor