]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/splitter.cpp
not necessary anymore
[wxWidgets.git] / src / generic / splitter.cpp
index c6841bc9dc9f6d6619c902ec389848721e36489d..1506cffcd729465f23c42706b1385b223a45f36f 100644 (file)
@@ -272,7 +272,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
         {
             SetResizeCursor();
         }
-#if defined(__WXGTK__) || defined(__WXMSW__)
+#if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__)
         else
         {
             // We must set the normal cursor in MSW, because
@@ -294,6 +294,11 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
 #endif // __WXMSW__
 
         int diff = m_splitMode == wxSPLIT_VERTICAL ? x - m_oldX : y - m_oldY;
+        if ( !diff )
+        {
+            // nothing to do, mouse didn't really move far enough
+            return;
+        }
 
         int posSashOld = isLive ? m_sashPosition : m_sashPositionCurrent;
         int posSashNew = OnSashPositionChanging(posSashOld + diff);
@@ -800,6 +805,9 @@ void wxSplitterWindow::SizeWindows()
 // Set pane for unsplit window
 void wxSplitterWindow::Initialize(wxWindow *window)
 {
+    wxASSERT_MSG( window->GetParent() == this,
+                  _T("windows in the splitter should have it as parent!") );
+
     m_windowOne = window;
     m_windowTwo = (wxWindow *) NULL;
     DoSetSashPosition(0);
@@ -815,6 +823,9 @@ bool wxSplitterWindow::DoSplit(wxSplitMode mode,
     if ( IsSplit() )
         return FALSE;
 
+    wxASSERT_MSG( window1->GetParent() == this && window2->GetParent() == this,
+                  _T("windows in the splitter should have it as parent!") );
+
     m_splitMode = mode;
     m_windowOne = window1;
     m_windowTwo = window2;