]> git.saurik.com Git - wxWidgets.git/commitdiff
fix typo in drawing slider ticks; added assert to check for it (slightly modified...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 6 Dec 2002 21:02:50 +0000 (21:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 6 Dec 2002 21:02:50 +0000 (21:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/univ/renderer.h
src/univ/themes/win32.cpp

index c0f8e947fdcac27bad502f7ad9ab3a00b79f7303..f6fe94b5155060b1f47b175211b47adb5d3cefab 100644 (file)
@@ -655,7 +655,7 @@ public:
                                  int step = 1,
                                  int flags = 0)
         { m_renderer->DrawSliderTicks(dc, rect, sizeThumb, orient,
-                                      start, end, start, flags); }
+                                      start, end, step, flags); }
 
     virtual void DrawMenuBarItem(wxDC& dc,
                                  const wxRect& rect,
index ccf87bc3ff467184d2f05af90bad77e2a56b1dfd..d3afd47d7c874073748f19e53ea37c3728b7d773 100644 (file)
@@ -2771,6 +2771,9 @@ void wxWin32Renderer::DrawSliderTicks(wxDC& dc,
         return;
     }
 
+    // this would lead to an infinite loop below
+    wxCHECK_RET( step > 1, _T("invalid step in wxRenderer::DrawSliderTicks") );
+
     // the variable names correspond to horizontal case, but they can be used
     // for both orientations
     wxCoord x1, x2, y1, y2, len, widthThumb;