]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Fix initial state of radio toolbar tools in wxGTK.
[wxWidgets.git] / src / common / wincmn.cpp
index 2d34340f70edffad972f9c6215a4b70cc4c00a79..969ace7bae41a319f58e6c75d393b7f86dd16339 100644 (file)
@@ -2121,6 +2121,13 @@ void wxWindowBase::DoSetToolTip(wxToolTip *tooltip)
     }
 }
 
+bool wxWindowBase::CopyToolTip(wxToolTip *tip)
+{
+    SetToolTip(tip ? new wxToolTip(tip->GetTip()) : NULL);
+
+    return tip != NULL;
+}
+
 #endif // wxUSE_TOOLTIPS
 
 // ----------------------------------------------------------------------------
@@ -3321,9 +3328,9 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, WindowOrder move)
 
 bool wxWindowBase::HasFocus() const
 {
-    wxWindowBase *win = DoFindFocus();
-    return win == this ||
-           win == wxConstCast(this, wxWindowBase)->GetMainWindowOfCompositeControl();
+    wxWindowBase* const win = DoFindFocus();
+    return win &&
+            (this == win || this == win->GetMainWindowOfCompositeControl());
 }
 
 // ----------------------------------------------------------------------------