kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #04992
Re: Component library files remove -- patch
>This patch does not follow established coding style, will not commit.
>
>Use C++ comment style for single line comments please.
>
>No space after if
>
>{ in wrong place.
>
>Add space before ) and after (
>
>And then if it is not objected to on function, it could be committed
>after these revisions.
Hello, again.
I think this version more in compliance with current kicad programming style.
Thanks for solutions.
=== modified file 'eeschema/dialog_eeschema_config.cpp'
--- eeschema/dialog_eeschema_config.cpp 2010-04-02 14:26:27 +0000
+++ eeschema/dialog_eeschema_config.cpp 2010-07-20 04:59:42 +0000
@@ -272,6 +272,15 @@
m_ListLibr->Delete(selections[ii] );
m_LibListChanged = TRUE;
}
+
+ // Select next item after deleted in m_ListLibr
+ if( m_ListLibr->GetCount() > 0 && selections.GetCount() > 0 )
+ {
+ int pos = selections[selections.GetCount()-1];
+ if( pos == m_ListLibr->GetCount() )
+ pos = m_ListLibr->GetCount() - 1;
+ m_ListLibr->SetSelection( pos );
+ }
}
Regards,
--
Yury Khalyavin
Follow ups