]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/caret.h
moved SetBestSize() to .cpp file; set min size from it
[wxWidgets.git] / include / wx / caret.h
index 266f6d278d0318713281b25ab351a35d4946167b..f8e547bc38fd5102e21309ed8ca99198f0063559 100644 (file)
@@ -212,18 +212,23 @@ public:
     wxCaretSuspend(wxWindow *win)
     {
         m_caret = win->GetCaret();
     wxCaretSuspend(wxWindow *win)
     {
         m_caret = win->GetCaret();
-        if ( m_caret )
+        m_show = FALSE;        
+        if ( m_caret && m_caret->IsVisible() )
+        {
             m_caret->Hide();
             m_caret->Hide();
+            m_show = TRUE;
+        }
     }
 
     ~wxCaretSuspend()
     {
     }
 
     ~wxCaretSuspend()
     {
-        if ( m_caret )
+        if ( m_caret && m_show )
             m_caret->Show();
     }
 
 private:
     wxCaret *m_caret;
             m_caret->Show();
     }
 
 private:
     wxCaret *m_caret;
+    bool     m_show;
 
     DECLARE_NO_COPY_CLASS(wxCaretSuspend)
 };
 
     DECLARE_NO_COPY_CLASS(wxCaretSuspend)
 };