/* Select on the layout the current net treeview selection */ static void netlist_select_cb (GtkWidget * widget, gpointer data) { LibraryEntryType *entry; ConnectionType conn; gint i; gboolean select_flag = GPOINTER_TO_INT (data); if (!selected_net) return; if (selected_net == node_selected_net) node_selected_net = NULL; InitConnectionLookup (); ClearFlagOnAllObjects (true, FOUNDFLAG); for (i = selected_net->EntryN, entry = selected_net->Entry; i; i--, entry++) if (SeekPad (entry, &conn, false)) RatFindHook (conn.type, conn.ptr1, conn.ptr2, conn.ptr2, true, FOUNDFLAG, true); SelectByFlag (FOUNDFLAG, select_flag); ClearFlagOnAllObjects (false, FOUNDFLAG); FreeConnectionLookupMemory (); IncrementUndoSerialNumber (); Draw (); }
/* Select on the layout the current net treeview selection */ static void nbcb_select_common (LibraryMenuType *net, int pos, int select_flag) { LibraryEntryType *entry; ConnectionType conn; int i; InitConnectionLookup (); ClearFlagOnAllObjects (true, FOUNDFLAG); for (i = net->EntryN, entry = net->Entry; i; i--, entry++) if (SeekPad (entry, &conn, false)) RatFindHook (conn.type, conn.ptr1, conn.ptr2, conn.ptr2, true, FOUNDFLAG, true); SelectByFlag (FOUNDFLAG, select_flag); ClearFlagOnAllObjects (false, FOUNDFLAG); FreeConnectionLookupMemory (); IncrementUndoSerialNumber (); Draw (); }