← Back to team overview

kicad-developers team mailing list archive

Component library files remove -- patch

 

Hi again,

This path select next item in "Component library files" after deleted
item. I may be very useful if you want to remove all standard libs, and
add self-written components. Without this patch you need select item in
"Component library files", press "Remove" button again and again -- this
very tired. With this patch you only once select item and press "Remove"
button quantum placet :)

Regards,
  Yury

=== 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-15 07:56:40 +0000
@@ -272,6 +272,14 @@
         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 );
+    }
 }
-- 
This message was sent from Launchpad by the user
Yury Khalyavin (https://launchpad.net/~snufrick)
using the "Contact this team" link on the KiCad Developers team page.
For more information see
https://help.launchpad.net/YourAccount/ContactingPeople



Follow ups