44 m_refRAName->SetLabelText( data->m_refRA->m_zone->GetZoneName() );
47 for(
auto& ra : data->m_compatMap )
51 ent.m_doCopy = ra.second.m_isOk;
52 ent.m_errMsg = ra.second.m_errorMsg;
53 ent.m_isOK = ra.second.m_isOk;
54 ent.m_raName = ra.first->m_ruleName;
55 ent.m_targetRA = ra.first;
56 ent.m_mismatchReasons = ra.second.m_mismatchReasons;
58 m_targetRAs.push_back( ent );
64 if ( !a.m_isOK && b.m_isOK )
66 else if ( a.m_isOK && !b.m_isOK )
69 return a.m_raName < b.m_raName;
78 m_raGrid->SetColLabelValue( 0, wxT(
"Copy") );
79 m_raGrid->SetColLabelValue( 1, wxT(
"Target Rule Area") );
80 m_raGrid->SetColLabelValue( 2, wxT(
"Status") );
81 m_raGrid->SetColLabelValue( 3, wxT(
"Details") );
87 m_raGrid->SetCellValue( i, 1, entry.m_raName );
88 m_raGrid->SetCellValue( i, 2, entry.m_isOK ? _(
"OK") : entry.m_errMsg );
89 m_raGrid->SetCellValue( i, 3, wxString() );
90 m_raGrid->SetCellRenderer( i, 0, new wxGridCellBoolRenderer);
91 m_raGrid->SetCellEditor( i, 0, new wxGridCellBoolEditor);
92 m_raGrid->SetCellValue( i, 0, entry.m_doCopy ? wxT(
"1") : wxT(
"") );
94 if( !entry.m_isOK && !entry.m_mismatchReasons.empty() )
96 wxGridCellAttr* attr = new wxGridCellAttr;
97 attr->SetRenderer( new GRID_CELL_ICON_RENDERER( m_detailsIcon ) );
99 m_raGrid->SetAttr( i, 3, attr );
100 m_raGrid->SetCellValue( i, 3, wxString() );
106 m_raGrid->Bind( wxEVT_GRID_CELL_LEFT_CLICK,
108 m_raGrid->SetMaxSize( wxSize( -1, 400 ) );
111 wxArrayString refFpNames;
112 refFpNames.push_back(
"" );
114 for(
FOOTPRINT* fp : data->m_refRA->m_components )
118 m_refAnchorFp->Set( refFpNames );
119 m_refAnchorFp->SetSelection( 0 );
121 m_cbCopyPlacement->SetValue( data->m_options.m_copyPlacement );
122 m_cbCopyRouting->SetValue( data->m_options.m_copyRouting );
123 m_cbCopyOnlyConnectedRouting->SetValue( data->m_options.m_connectedRoutingOnly );
124 m_cbGroupItems->SetValue( data->m_options.m_groupItems );
125 m_cbCopyOtherItems->SetValue( data->m_options.m_copyOtherItems );
126 m_cbIncludeLockedComponents->SetValue( data->m_options.m_includeLockedItems );
129 SetupStandardButtons();
130 finishDialogSettings();
146 wxString doCopy =
m_raGrid->GetCellValue( i, 0 );
148 data->m_compatMap[
m_targetRAs[i].m_targetRA].m_doCopy =
149 !doCopy.CompareTo( wxT(
"1" ) ) ? true :
false;
161 data->m_options.m_anchorFp =
nullptr;
168 data->m_options.m_anchorFp = fp;