98 std::vector<SCH_ITEM*> labels = subgraph->GetVectorBusLabels();
99 wxASSERT( labels.size() > 1 );
121 wxString old = item.labels[0];
122 for(
unsigned j = 1; j < item.labels.size(); j++ )
123 old <<
", " << item.labels[j];
127 m_migration_list->SetItem( i, 0, item.subgraph->GetSheet().PathHumanReadable() );
139 const std::vector<wxString>& aLabelList )
141 int lowest_start = INT_MAX;
142 int highest_end = -1;
147 for(
const wxString& label : aLabelList )
154 if( start < lowest_start )
155 lowest_start = start;
157 if( end > highest_end )
160 if( end - start + 1 > widest_bus )
161 widest_bus = end - start + 1;
164 std::vector<wxString> proposals;
166 for(
const wxString& label : aLabelList )
170 proposal <<
"[" << highest_end <<
".." << lowest_start <<
"]";
171 proposals.push_back( proposal );
180 unsigned sel = aEvent.GetIndex();
181 wxASSERT( sel <
m_items.size() );
203 for(
const wxString& option :
m_items[sel].possible_labels )
219 std::vector<SCH_ITEM*> labels =
m_items[sel].subgraph->GetVectorBusLabels();
static TOOL_ACTION zoomFitScreen
std::vector< const CONNECTION_SUBGRAPH * > GetBusesNeedingMigration()
Determine which subgraphs have more than one conflicting bus label.
A subgraph is a set of items that are electrically connected on a single sheet.
const SCH_ITEM * GetDriver() const
const SCH_SHEET_PATH & GetSheet() const
Class DIALOG_MIGRATE_BUSES_BASE.
wxListView * m_migration_list
wxComboBox * m_cb_new_name
void onAcceptClicked(wxCommandEvent &aEvent)
void onItemSelected(wxListEvent &aEvent)
unsigned m_selected_index
std::vector< wxString > getProposedLabels(const std::vector< wxString > &aLabelList)
std::vector< BUS_MIGRATION_STATUS > m_items
DIALOG_MIGRATE_BUSES(SCH_EDIT_FRAME *aParent)
Migrates buses using legacy multi-label joining behavior.
KIGFX::VIEW_CONTROLS * GetViewControls() const
Return a pointer to the #VIEW_CONTROLS instance used in the panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
virtual VECTOR2I GetPosition() const
virtual void SetCrossHairCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true)=0
Move the graphic crosshair cursor to the requested position expressed in world coordinates.
CONNECTION_GRAPH * ConnectionGraph() const override
void SetCurrentSheet(const SCH_SHEET_PATH &aPath) override
virtual void RedrawScreen(const VECTOR2I &aCenterPoint, bool aWarpPointer)
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void ConfigureFromLabel(const wxString &aLabel)
Configures the connection given a label.
wxString VectorPrefix() const
Schematic editor (Eeschema) main window.
SCH_SHEET_PATH & GetCurrentSheet() const
SCHEMATIC & Schematic() const
void TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void UpdateAllScreenReferences() const
Update all the symbol references for this sheet path.
std::vector< wxString > possible_labels
const CONNECTION_SUBGRAPH * subgraph
std::vector< wxString > labels