diff --git a/Monorail/Monorail/FormMonorailCollection.cs b/Monorail/Monorail/FormMonorailCollection.cs index 7aba1a5..3c840fb 100644 --- a/Monorail/Monorail/FormMonorailCollection.cs +++ b/Monorail/Monorail/FormMonorailCollection.cs @@ -29,7 +29,7 @@ namespace Monorail if (form.ShowDialog() == DialogResult.OK) { - if (_monorails + form.SelectedMonorail) + if (_monorails + form.SelectedMonorail != -1) { MessageBox.Show("Объект добавлен"); pictureBoxCollection.Image = _monorails.ShowMonorails();