]> git.saurik.com Git - wxWidgets.git/commitdiff
I don't think the last person to edit splitter.cpp did
authorRobert Roebling <robert@roebling.de>
Sat, 18 Mar 2000 18:47:00 +0000 (18:47 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 18 Mar 2000 18:47:00 +0000 (18:47 +0000)
    actually run the sample afterwards. I did.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/splitter.cpp

index 01167426965d66c64ef60042549dc0d4b82c3707..58533b813b2f8647d74d32f1f31c89b5d4082f04 100644 (file)
@@ -268,7 +268,6 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
         }
 
         SizeWindows();
-        m_needUpdating = FALSE;
     }  // left up && dragging
     else if (event.Moving() && !event.Dragging())
     {
@@ -297,8 +296,6 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
             SetCursor(* wxSTANDARD_CURSOR);
         }
 #endif // __WXGTK__
-
-        m_needUpdating = FALSE;
     }
     else if (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING))
     {
@@ -332,6 +329,9 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
                 return;
             }
         }
+        
+        if (new_sash_position == m_sashPosition)
+            return;
 
         // Erase old tracker
         if ((GetWindowStyleFlag() & wxSP_LIVE_UPDATE) == 0)
@@ -344,12 +344,9 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
         else
             y = new_sash_position;
 
-        if (new_sash_position != -1)
-        {
-            // Only modify if permitted
-            m_oldX = x;
-            m_oldY = y;
-        }
+        // Remember old positions
+        m_oldX = x;
+        m_oldY = y;
 
 #ifdef __WXMSW__
         // As we captured the mouse, we may get the mouse events from outside
@@ -683,6 +680,8 @@ void wxSplitterWindow::SizeWindows()
     if ( m_borderSize > 0 )
         DrawBorders(dc);
     DrawSash(dc);
+    
+    m_needUpdating = FALSE;
 }
 
 // Set pane for unsplit window