]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/notebook.cpp
fixing memory leak (reported by Ken Thomases)
[wxWidgets.git] / src / univ / notebook.cpp
index 29f728072dc22156a8af5afbbc2d2804e3c30cbe..c97f7189b8a06f9403bcacf328f704cf83cae201 100644 (file)
@@ -745,8 +745,16 @@ wxRect wxNotebook::GetTabsPart() const
     const wxSize indent = GetRenderer()->GetTabIndent();
     if ( IsVertical() )
     {
-        rect.x += indent.y;
         rect.y += indent.x;
+        if ( dir == wxLEFT )
+        {
+            rect.x += indent.y;
+            rect.width -= indent.y;
+        }
+        else // wxRIGHT
+        {
+            rect.width -= indent.y;
+        }
     }
     else // horz
     {