mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
parent
552ca7bf71
commit
4ab887c773
@ -62,14 +62,25 @@ void EntryView::keyPressEvent(QKeyEvent* event)
|
||||
void EntryView::setGroup(Group* group)
|
||||
{
|
||||
m_model->setGroup(group);
|
||||
Q_EMIT entrySelectionChanged();
|
||||
setFirstEntryActive();
|
||||
}
|
||||
|
||||
void EntryView::setEntryList(const QList<Entry*>& entries)
|
||||
{
|
||||
m_model->setEntryList(entries);
|
||||
setFirstEntryActive();
|
||||
}
|
||||
|
||||
void EntryView::setFirstEntryActive()
|
||||
{
|
||||
if(m_model->rowCount() > 0) {
|
||||
QModelIndex index = m_sortModel->mapToSource(m_sortModel->index(0, 0));
|
||||
setCurrentEntry(m_model->entryFromIndex(index));
|
||||
}
|
||||
else {
|
||||
Q_EMIT entrySelectionChanged();
|
||||
}
|
||||
}
|
||||
|
||||
bool EntryView::inEntryListMode()
|
||||
{
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
void setEntryList(const QList<Entry*>& entries);
|
||||
bool inEntryListMode();
|
||||
int numberOfSelectedEntries();
|
||||
void setFirstEntryActive();
|
||||
|
||||
public Q_SLOTS:
|
||||
void setGroup(Group* group);
|
||||
|
Loading…
Reference in New Issue
Block a user