Replaced port area helper and avoided crash when searching at a harbour that has no entries
This commit is contained in:
parent
703986bbbc
commit
ee6658bafd
@ -523,15 +523,18 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void buttonSearchPortArea_Click(object sender, RoutedEventArgs e)
|
private void buttonSearchPortArea_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SelectPortAreaDialog spad = new SelectPortAreaDialog(this.Core.PoC);
|
if (portAreas != null)
|
||||||
if(spad.ShowDialog() ?? false)
|
|
||||||
{
|
{
|
||||||
if(spad.SelectedArea != null)
|
SelectPortAreaDialog spad = new SelectPortAreaDialog(this.Core.PoC);
|
||||||
|
if (spad.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if (portAreas.ContainsKey(spad.SelectedArea))
|
if (spad.SelectedArea != null)
|
||||||
{
|
{
|
||||||
var pair = portAreas.SingleOrDefault(p => p.Key == spad.SelectedArea);
|
if (portAreas.ContainsKey(spad.SelectedArea))
|
||||||
this.comboBoxPortArea.SelectedItem = pair;
|
{
|
||||||
|
var pair = portAreas.SingleOrDefault(p => p.Key == spad.SelectedArea);
|
||||||
|
this.comboBoxPortArea.SelectedItem = pair;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
misc/db.sqlite
BIN
misc/db.sqlite
Binary file not shown.
Loading…
Reference in New Issue
Block a user