From 0e4e9206ffcf03eca02707cc719367d00932e888 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Sat, 13 Nov 2021 04:10:37 +0100 Subject: [PATCH] PCM: Make version grid only selectable by rows, not individual cells And select the first row from the top by default. --- kicad/pcm/dialogs/panel_packages_view.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kicad/pcm/dialogs/panel_packages_view.cpp b/kicad/pcm/dialogs/panel_packages_view.cpp index 2d12f3c196..0fce0f8bdf 100644 --- a/kicad/pcm/dialogs/panel_packages_view.cpp +++ b/kicad/pcm/dialogs/panel_packages_view.cpp @@ -84,6 +84,9 @@ PANEL_PACKAGES_VIEW::PANEL_PACKAGES_VIEW( wxWindow* false ) ); } + // Most likely should be changed to wxGridSelectNone once WxWidgets>=3.1.5 is mandatory. + m_gridVersions->SetSelectionMode( WX_GRID::wxGridSelectRows ); + m_packageListWindow->SetBackgroundColour( wxStaticText::GetClassDefaultAttributes().colBg ); m_infoScrollWindow->SetBackgroundColour( wxStaticText::GetClassDefaultAttributes().colBg ); m_infoScrollWindow->EnableScrolling( false, true ); @@ -314,6 +317,9 @@ void PANEL_PACKAGES_VIEW::setPackageDetails( const PACKAGE_VIEW_DATA& aPackageDa false ) ); } + if( m_gridVersions->GetNumberRows() >= 1 ) + m_gridVersions->SelectRow( 0 ); + m_gridVersions->Thaw(); updateDetailsButtons();