diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 38985b43ff..6d25185ea9 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1719,7 +1719,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) { m_lines[i].Draw( &dc ); // Draw horizontal rule if required - if (GetWindowStyle() & wxLC_HRULES) + if (m_mode & wxLC_HRULES) { dc.SetPen(pen); dc.SetBrush(* wxTRANSPARENT_BRUSH); @@ -1728,7 +1728,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) } // Draw last horizontal rule - if ((i > (size_t) (y_s / lineSpacing)) && (GetWindowStyle() & wxLC_HRULES)) + if ((i > (size_t) (y_s / lineSpacing)) && (m_mode & wxLC_HRULES)) { dc.SetPen(pen); dc.SetBrush(* wxTRANSPARENT_BRUSH); @@ -1736,7 +1736,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) } // Draw vertical rules if required - if ((GetWindowStyle() & wxLC_VRULES) && (GetItemCount() > 0)) + if ((m_mode & wxLC_VRULES) && (GetItemCount() > 0)) { int col = 0; wxRect firstItemRect; diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 62f65318ea..edc7d866a8 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -775,7 +775,17 @@ bool wxWindow::Show(bool show) } } MacSuperShown( show ) ; - Refresh() ; + if ( !show ) + { + WindowRef window = GetMacRootWindow() ; + wxWindow* win = wxFindWinFromMacWindow( window ) ; + if ( !win->m_isBeingDeleted ) + Refresh() ; + } + else + { + Refresh() ; + } return TRUE; } diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 62f65318ea..edc7d866a8 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -775,7 +775,17 @@ bool wxWindow::Show(bool show) } } MacSuperShown( show ) ; - Refresh() ; + if ( !show ) + { + WindowRef window = GetMacRootWindow() ; + wxWindow* win = wxFindWinFromMacWindow( window ) ; + if ( !win->m_isBeingDeleted ) + Refresh() ; + } + else + { + Refresh() ; + } return TRUE; }