From 2101324691215e69f30587d807579c4514b96fa1 Mon Sep 17 00:00:00 2001 From: Blair Bonnett Date: Sat, 28 Feb 2015 11:48:39 -0500 Subject: [PATCH] Fix wxGTK scrollbar assertion in Pcbnew layer setup dialog. --- common/draw_panel.cpp | 8 +------- pcbnew/dialogs/dialog_layers_setup.cpp | 4 +++- pcbnew/dialogs/dialog_layers_setup_base.cpp | 4 ++-- pcbnew/dialogs/dialog_layers_setup_base.fbp | 4 ++-- pcbnew/dialogs/dialog_layers_setup_base.h | 2 +- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/common/draw_panel.cpp b/common/draw_panel.cpp index 4c425bfa09..f2f823cdb4 100644 --- a/common/draw_panel.cpp +++ b/common/draw_panel.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr * Copyright (C) 2007-2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -87,18 +87,12 @@ END_EVENT_TABLE() EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, const wxPoint& pos, const wxSize& size ) : -#if wxCHECK_VERSION( 2, 9, 5 ) wxScrolledWindow( parent, id, pos, size, wxBORDER | wxHSCROLL | wxVSCROLL ) -#else - wxScrolledWindow( parent, id, pos, size, wxBORDER | wxHSCROLL | wxVSCROLL | wxALWAYS_SHOW_SB ) -#endif { wxASSERT( parent ); -#if wxCHECK_VERSION( 2, 9, 5 ) ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS ); DisableKeyboardScrolling(); -#endif m_scrollIncrementX = std::min( size.x / 8, 10 ); m_scrollIncrementY = std::min( size.y / 8, 10 ); diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index 28ffdab9a3..048c6b545c 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2009 Isaac Marino Bavaresco, isaacbavaresco@yahoo.com.br * Copyright (C) 2009 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2009 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2009 - 2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -357,6 +357,8 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoa // plus 10 so we can have a border of 5 on both top and bottom. m_TitlePanel->SetMinSize( wxSize( -1, m_AdhesFrontName->GetSize().y+10 ) ); + m_LayersListPanel->ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS ); + Layout(); Fit(); diff --git a/pcbnew/dialogs/dialog_layers_setup_base.cpp b/pcbnew/dialogs/dialog_layers_setup_base.cpp index 9ca59bd99f..2d90150bcc 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.cpp +++ b/pcbnew/dialogs/dialog_layers_setup_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 6 2013) +// C++ code generated with wxFormBuilder (version Nov 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -73,7 +73,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID b_layersListSizer->Add( bCaptionsSizer, 0, wxALIGN_CENTER|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_LayersListPanel = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxALWAYS_SHOW_SB|wxRAISED_BORDER|wxTAB_TRAVERSAL|wxVSCROLL ); + m_LayersListPanel = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxRAISED_BORDER|wxTAB_TRAVERSAL|wxVSCROLL ); m_LayersListPanel->SetScrollRate( 0, 5 ); m_LayerListFlexGridSizer = new wxFlexGridSizer( 0, 3, 0, 0 ); m_LayerListFlexGridSizer->AddGrowableCol( 0 ); diff --git a/pcbnew/dialogs/dialog_layers_setup_base.fbp b/pcbnew/dialogs/dialog_layers_setup_base.fbp index 2783fecfae..024fce8d69 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.fbp +++ b/pcbnew/dialogs/dialog_layers_setup_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -707,7 +707,7 @@ - wxALWAYS_SHOW_SB|wxRAISED_BORDER|wxTAB_TRAVERSAL|wxVSCROLL + wxRAISED_BORDER|wxTAB_TRAVERSAL|wxVSCROLL diff --git a/pcbnew/dialogs/dialog_layers_setup_base.h b/pcbnew/dialogs/dialog_layers_setup_base.h index e7c8a1d6f8..d9d53a0093 100644 --- a/pcbnew/dialogs/dialog_layers_setup_base.h +++ b/pcbnew/dialogs/dialog_layers_setup_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 6 2013) +// C++ code generated with wxFormBuilder (version Nov 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE!