mirror of
https://github.com/EpicMorg/UniversalValveToolbox.git
synced 2024-12-26 22:55:30 +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);
|
||||
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;
|
||||
}
|
||||
|
@ -85,7 +85,8 @@ namespace UniversalValveToolbox {
|
||||
}
|
||||
|
||||
private void comboBoxEngine_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
model.SelectProject.Engine = ((EngineDtoModel)comboBoxEngine.SelectedItem).Appid;
|
||||
if (model.SelectProject != null)
|
||||
model.SelectProject.Engine = ((EngineDtoModel)comboBoxEngine.SelectedItem).Appid;
|
||||
}
|
||||
|
||||
private void comboBox_Mod_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
|
Loading…
Reference in New Issue
Block a user