[chore:] adapt button enabeling to existance of PersonErrors

This commit is contained in:
2026-06-09 12:38:20 +02:00
parent 1d0876fa40
commit 1f73238216
+16 -3
View File
@@ -698,10 +698,23 @@ public partial class MainWindow : Window
BtnCheck.IsEnabled = true; BtnCheck.IsEnabled = true;
BtnCombine.IsEnabled = true; BtnCombine.IsEnabled = true;
BtnGenerateLabels.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;
} }
} }