mirror of
https://github.com/EpicMorg/UniversalValveToolbox.git
synced 2024-12-27 07:05:29 +03:00
project removing fix
This commit is contained in:
parent
3a33fde10a
commit
174f7baa16
@ -34,7 +34,7 @@ namespace UniversalValveToolbox.Model.ViewModel {
|
|||||||
ForceUpdateField(value, ref selectProjectIndex);
|
ForceUpdateField(value, ref selectProjectIndex);
|
||||||
OnPropertyChanged(nameof(SelectProject));
|
OnPropertyChanged(nameof(SelectProject));
|
||||||
|
|
||||||
var index = Math.Max(engines.ToList().FindIndex(engine => engine.Appid == SelectProject.Engine), 0);
|
var index = Math.Max(engines.ToList().FindIndex(engine => engine.Appid == SelectProject?.Engine), -1);
|
||||||
|
|
||||||
SelectEngineIndex = index;
|
SelectEngineIndex = index;
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,7 @@ namespace UniversalValveToolbox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void comboBoxEngine_SelectedIndexChanged(object sender, EventArgs e) {
|
private void comboBoxEngine_SelectedIndexChanged(object sender, EventArgs e) {
|
||||||
|
if (model.SelectProject != null)
|
||||||
model.SelectProject.Engine = ((EngineDtoModel)comboBoxEngine.SelectedItem).Appid;
|
model.SelectProject.Engine = ((EngineDtoModel)comboBoxEngine.SelectedItem).Appid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user