[chore:] adapt button enabeling to existance of PersonErrors
This commit is contained in:
+16
-3
@@ -698,10 +698,23 @@ public partial class MainWindow : Window
|
||||
BtnCheck.IsEnabled = true;
|
||||
BtnCombine.IsEnabled = true;
|
||||
BtnGenerateLabels.IsEnabled = true;
|
||||
BtnShorten.IsEnabled = true;
|
||||
|
||||
// BtnRepair.IsEnabled = true;
|
||||
// BtnShorten.IsEnabled = true;
|
||||
// check for existing errors, otherwise disable the features
|
||||
foreach(KasPerson pers in (LstCustomerAdressSets.SelectedItem as KasAddressList).KasPersons)
|
||||
if (pers.PersonError != null)
|
||||
{
|
||||
BtnShorten.IsEnabled = true;
|
||||
// BtnRepair.IsEnabled = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
BtnShorten.IsEnabled = false;
|
||||
BtnRepair.IsEnabled = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user