diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index 56b8f36..384ece8 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -698,10 +698,23 @@ public partial class MainWindow : Window BtnCheck.IsEnabled = true; BtnCombine.IsEnabled = true; BtnGenerateLabels.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; + } - // BtnRepair.IsEnabled = true; - // BtnShorten.IsEnabled = true; + + } }