X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/caaa4cfd6779b689d6723e06df23cc23d1799fd3..0d2a2b601b1994333886dff8f53d82a714c4042f:/src/generic/gridg.cpp?ds=sidebyside diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp index 84b4b4546f..0747e1917f 100644 --- a/src/generic/gridg.cpp +++ b/src/generic/gridg.cpp @@ -88,7 +88,7 @@ wxGenericGrid::wxGenericGrid(void) m_editable = TRUE; #if defined(__WIN95__) m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); -#elseif defined(__WXGTK__) +#elif defined(__WXGTK__) m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); #else m_scrollWidth = 16; @@ -146,7 +146,7 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, m_editable = TRUE; #if defined(__WIN95__) m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); -#elseif defined(__WXGTK__) +#elif defined(__WXGTK__) m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); #else m_scrollWidth = 16; @@ -1024,7 +1024,7 @@ void wxGenericGrid::AdjustScrollbars(void) if (m_hScrollBar && !m_hScrollBar->IsShown()) horizScrollBarHeight = 0; - if (m_hScrollBar) + if (m_hScrollBar && m_hScrollBar->IsShown()) { int nCols = GetCols(); m_hScrollBar->SetScrollbar(m_hScrollBar->GetThumbPosition(), wxMax(noHorizSteps, 1), (noHorizSteps == 0) ? 1 : nCols, wxMax(noHorizSteps, 1)); @@ -1038,7 +1038,7 @@ void wxGenericGrid::AdjustScrollbars(void) } - if (m_vScrollBar) + if (m_vScrollBar && m_vScrollBar->IsShown()) { int nRows = GetRows();