87 std::vector<SCH_ITEM*> labels = subgraph->GetVectorBusLabels();
88 wxASSERT( labels.size() > 1 );
110 wxString old = item.labels[0];
111 for(
unsigned j = 1; j < item.labels.size(); j++ )
112 old <<
", " << item.labels[j];
116 m_migration_list->SetItem( i, 0, item.subgraph->GetSheet().PathHumanReadable() );
128 const std::vector<wxString>& aLabelList )
130 int lowest_start = INT_MAX;
131 int highest_end = -1;
136 for(
const wxString& label : aLabelList )
143 if( start < lowest_start )
144 lowest_start = start;
146 if( end > highest_end )
149 if( end - start + 1 > widest_bus )
150 widest_bus = end - start + 1;
153 std::vector<wxString> proposals;
155 for(
const wxString& label : aLabelList )
159 proposal <<
"[" << highest_end <<
".." << lowest_start <<
"]";
160 proposals.push_back( proposal );
169 unsigned sel = aEvent.GetIndex();
170 wxASSERT( sel <
m_items.size() );
192 for(
const wxString& option :
m_items[sel].possible_labels )
208 std::vector<SCH_ITEM*> labels =
m_items[sel].subgraph->GetVectorBusLabels();
static TOOL_ACTION zoomFitScreen
std::vector< const CONNECTION_SUBGRAPH * > GetBusesNeedingMigration()
Determines 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