Re: [Kicad-developers] [PATCH] Fix focus bug and possible race-condition for path deletion
Thank you Thomas, I have just pushed your patch to the master branch. Cheers, Orson On 09/02/2018 08:59 PM, Thomas Pointhuber wrote: > Ping: please review and merge this little patch > > On 30.08.18 14:23, Thomas Pointhuber wrote: >> Hi, >> >> a small follow-up patch for >> https://bugs.launchpad.net/kicad/+bug/1788873 which fixes some remaining >> issues >> >> Regards, Thomas >> >> >> ___ >> Mailing list: https://launchpad.net/~kicad-developers >> Post to : kicad-developers@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~kicad-developers >> More help : https://help.launchpad.net/ListHelp >> > > > > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > signature.asc Description: OpenPGP digital signature ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] [PATCH] Fix focus bug and possible race-condition for path deletion
Ping: please review and merge this little patch On 30.08.18 14:23, Thomas Pointhuber wrote: > Hi, > > a small follow-up patch for > https://bugs.launchpad.net/kicad/+bug/1788873 which fixes some remaining > issues > > Regards, Thomas > > > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > signature.asc Description: OpenPGP digital signature ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] [PATCH] Fix focus bug and possible race-condition for path deletion
Hi, a small follow-up patch for https://bugs.launchpad.net/kicad/+bug/1788873 which fixes some remaining issues Regards, Thomas From 7599429256c815142272db6bc1f0e8be64f174de Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Thu, 30 Aug 2018 14:21:01 +0200 Subject: [PATCH] Fix focus bug and possible race-condition for path deletion dialog --- common/dialogs/dialog_configure_paths.cpp | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/dialogs/dialog_configure_paths.cpp b/common/dialogs/dialog_configure_paths.cpp index 6d8586a6a..5266a47a0 100644 --- a/common/dialogs/dialog_configure_paths.cpp +++ b/common/dialogs/dialog_configure_paths.cpp @@ -374,7 +374,7 @@ void DIALOG_CONFIGURE_PATHS::OnRemoveEnvVar( wxCommandEvent& event ) { int curRow = m_EnvVars->GetGridCursorRow(); -if( curRow < 0 ) +if( curRow < 0 || m_EnvVars->GetNumberRows() <= curRow ) return; else if( IsEnvVarImmutable( m_EnvVars->GetCellValue( curRow, EV_NAME_COL ) ) ) { @@ -394,11 +394,8 @@ void DIALOG_CONFIGURE_PATHS::OnDeleteSearchPath( wxCommandEvent& event ) { int curRow = m_SearchPaths->GetGridCursorRow(); -if( !m_SearchPaths->HasFocus() || curRow < 0 ) -{ -m_SearchPaths->SetFocus(); +if( curRow < 0 || m_SearchPaths->GetNumberRows() <= curRow ) return; -} m_SearchPaths->CommitPendingChanges( true /* silent mode; we don't care if it's valid */ ); m_SearchPaths->DeleteRows( curRow, 1 ); -- 2.18.0 signature.asc Description: OpenPGP digital signature ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp