Skip to content

Commit 0234b54

Browse files
committed
fix: missing clicked in mappingcomponent
1 parent 0d79817 commit 0234b54

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/gui/components/mappingcomponent.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ namespace swift::gui::components
8484
&CMappingComponent::onModelsUpdateRequested);
8585
connect(ui->tvp_AircraftModels, &CAircraftModelView::modelDataChanged, this,
8686
&CMappingComponent::onRowCountChanged);
87+
connect(ui->tvp_AircraftModels, &CAircraftModelView::clicked, this, &CMappingComponent::onModelSelectedInView);
8788
connect(ui->tvp_AircraftModels, &CAircraftModelView::requestTempDisableModelsForMatching, this,
8889
&CMappingComponent::onTempDisableModelsForMatchingRequested);
8990

@@ -258,6 +259,12 @@ namespace swift::gui::components
258259
ui->completer_ModelStrings->setModel(simAircraft.getModel());
259260
}
260261

262+
void CMappingComponent::onModelSelectedInView(const QModelIndex &index)
263+
{
264+
const CAircraftModel model = ui->tvp_AircraftModels->at(index);
265+
ui->completer_ModelStrings->setModel(model);
266+
}
267+
261268
CCallsign CMappingComponent::validateRenderedCallsign()
262269
{
263270
const QString cs = ui->le_Callsign->text().trimmed();

src/gui/components/mappingcomponent.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ namespace swift::gui
113113
//! Aircraft selected (in view)
114114
void onAircraftSelectedInView(const QModelIndex &index);
115115

116+
//! Model selected (in view)
117+
void onModelSelectedInView(const QModelIndex &index);
118+
116119
//! Save changed aircraft
117120
void onSaveAircraft();
118121

0 commit comments

Comments
 (0)