]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Fix for #11647: text from WriteText not scrolled to be visible in wxRichTextCtrl
[wxWidgets.git] / src / generic / grid.cpp
index 45d61abdc866d14c0f343f45a6aa9a7626ff4039..5701bbef22aedad0444d7643887b36a0ea0cbd95 100644 (file)
@@ -156,6 +156,23 @@ wxDEFINE_EVENT( wxEVT_GRID_EDITOR_SHOWN, wxGridEvent );
 wxDEFINE_EVENT( wxEVT_GRID_EDITOR_HIDDEN, wxGridEvent );
 wxDEFINE_EVENT( wxEVT_GRID_EDITOR_CREATED, wxGridEditorCreatedEvent );
 
+// ----------------------------------------------------------------------------
+// private helpers
+// ----------------------------------------------------------------------------
+
+namespace
+{
+    
+    // ensure that first is less or equal to second, swapping the values if
+    // necessary
+    void EnsureFirstLessThanSecond(int& first, int& second)
+    {
+        if ( first > second )
+            wxSwap(first, second);
+    }
+    
+} // anonymous namespace
+
 // ============================================================================
 // implementation
 // ============================================================================