Improve update of enabled state of group actions.

This commit is contained in:
Florian Geyer 2012-05-27 17:06:04 +02:00
parent 6fb6e1dc82
commit adbce87ccd

View File

@ -601,10 +601,9 @@ void DatabaseWidget::clearLastGroup(Group* group)
void DatabaseWidget::updateGroupActions(Group* group) void DatabaseWidget::updateGroupActions(Group* group)
{ {
bool inSearch = m_lastGroup; m_actionGroupNew->setEnabled(group);
m_actionGroupNew->setEnabled(group && !inSearch); m_actionGroupEdit->setEnabled(group);
m_actionGroupEdit->setEnabled(group && !inSearch); m_actionGroupDelete->setEnabled(group && canDeleteCurrentGoup());
m_actionGroupDelete->setEnabled(group && !inSearch && canDeleteCurrentGoup());
} }
void DatabaseWidget::updateEntryActions() void DatabaseWidget::updateEntryActions()