]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
[1242443] wxUSE_UNICODE fix for wxLaunchDefaultBrowser.
[wxWidgets.git] / src / generic / listctrl.cpp
index f02f3b99cc60f2fffcaf19bac13a7388666dcb42..72bd336298228978f04bb13ce19e9da7a41b7261 100644 (file)
@@ -837,11 +837,7 @@ protected:
     // get the colour to be used for drawing the rules
     wxColour GetRuleColour() const
     {
-#ifdef __WXMAC__
-        return *wxWHITE;
-#else
         return wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT);
-#endif
     }
 
 private:
@@ -1932,7 +1928,7 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
         // end of the current column
         int xpos = 0;
 
-        // find the column where this event occured
+        // find the column where this event occurred
         int col,
             countCol = m_owner->GetColumnCount();
         for (col = 0; col < countCol; col++)
@@ -2147,7 +2143,7 @@ void wxListTextCtrl::OnKeyUp( wxKeyEvent &event )
 
 void wxListTextCtrl::OnKillFocus( wxFocusEvent &event )
 {
-    if ( !m_finished )
+    if ( !m_finished && !m_aboutToFinish  )
     {
         // We must finish regardless of success, otherwise we'll get
         // focus problems:
@@ -2247,9 +2243,6 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
                                        wxSOLID
                                     );
 
-    wxSize sz = size;
-    sz.y = 25;
-
     SetScrollbars( 0, 0, 0, 0, 0, 0 );
 
     wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
@@ -3014,11 +3007,11 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
             HighlightAll( false );
             ReverseHighlight(m_lineSelectSingleOnUp);
         }
-        else if (m_lastOnSame)
+        if (m_lastOnSame)
         {
             if ((current == m_current) &&
                 (hitResult == wxLIST_HITTEST_ONITEMLABEL) &&
-                HasFlag(wxLC_EDIT_LABELS)  )
+                HasFlag(wxLC_EDIT_LABELS) )
             {
                 m_renameTimer->Start( 100, true );
             }
@@ -3028,7 +3021,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
     }
     else
     {
-        // This is neccessary , because after a DnD operation in
+        // This is necessary, because after a DnD operation in
         // from and to ourself, the up event is swallowed by the
         // DnD code. So on next non-up event (which means here and
         // now) m_lineSelectSingleOnUp should be reset.
@@ -3061,6 +3054,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         m_lineLastClicked = current;
 
         size_t oldCurrent = m_current;
+        bool oldWasSelected = IsHighlighted(m_current);
+
         bool cmdModifierDown = event.CmdDown();
         if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) )
         {
@@ -3114,7 +3109,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         }
 
         // forceClick is only set if the previous click was on another item
-        m_lastOnSame = !forceClick && (m_current == oldCurrent);
+        m_lastOnSame = !forceClick && (m_current == oldCurrent) && oldWasSelected;
     }
 }