]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
fixed memory leak in wxNativeFontInfo when using Pango
[wxWidgets.git] / src / generic / listctrl.cpp
index ce1a34c6af226da5f6186b4c952df3f77bb069fb..b7143eaa85313eb350aa7d0a37567b7c45e11c48 100644 (file)
@@ -1666,13 +1666,13 @@ wxListHeaderWindow::wxListHeaderWindow( wxWindow *win,
 
 #if _USE_VISATTR
     wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
-    SetDefaultForegroundColour( attr.colFg );
-    SetDefaultBackgroundColour( attr.colBg );
-    SetDefaultFont( attr.font );
+    SetOwnForegroundColour( attr.colFg );
+    SetOwnBackgroundColour( attr.colBg );
+    SetOwnFont( attr.font );
 #else
-    SetDefaultForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
-    SetDefaultBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
-    SetDefaultFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
+    SetOwnForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+    SetOwnBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+    SetOwnFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
 #endif
 }
 
@@ -2212,9 +2212,9 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
     SetScrollbars( 0, 0, 0, 0, 0, 0 );
 
     wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
-    SetDefaultForegroundColour( attr.colFg );
-    SetDefaultBackgroundColour( attr.colBg );
-    SetDefaultFont( attr.font );
+    SetOwnForegroundColour( attr.colFg );
+    SetOwnBackgroundColour( attr.colBg );
+    SetOwnFont( attr.font );
 }
 
 wxListMainWindow::~wxListMainWindow()
@@ -2981,8 +2981,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         m_lineLastClicked = current;
 
         size_t oldCurrent = m_current;
-
-        if ( IsSingleSel() || !(event.ControlDown() || event.ShiftDown()) )
+        bool cmdModifierDown = event.CmdDown();
+        if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) )
         {
             HighlightAll( false );
 
@@ -2992,7 +2992,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         }
         else // multi sel & either ctrl or shift is down
         {
-            if (event.ControlDown())
+            if (cmdModifierDown)
             {
                 ChangeCurrent(current);