UI: *Edit: Refactor of initializeFocus()

This commit is contained in:
Nodir Temirkhodjaev 2024-04-03 11:14:01 +03:00
parent 78900b97b8
commit 67513ff7e7
3 changed files with 5 additions and 4 deletions

View File

@ -191,7 +191,6 @@ void ProgramEditDialog::initializeFocus()
} else if (isWildcard()) {
m_editWildcard->setFocus();
} else {
m_editPath->selectAll();
m_editPath->setFocus();
}
}

View File

@ -82,8 +82,11 @@ void RuleEditDialog::initializeRuleSet()
void RuleEditDialog::initializeFocus()
{
m_editName->selectAll();
m_editName->setFocus();
if (isEmpty()) {
m_editName->setFocus();
} else {
m_editRuleText->setFocus();
}
}
void RuleEditDialog::setupController()

View File

@ -66,7 +66,6 @@ void ZoneEditDialog::initializeBySource(const ZoneSourceWrapper &zoneSource)
void ZoneEditDialog::initializeFocus()
{
m_editName->selectAll();
m_editName->setFocus();
}