mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-29 01:06:27 -05:00
create new entry while searching
This commit is contained in:
parent
edb7b56f1a
commit
00ce60ef20
@ -339,6 +339,11 @@ void DatabaseWidget::createEntry()
|
||||
}
|
||||
|
||||
m_newEntry = new Entry();
|
||||
|
||||
if (isInSearchMode()) {
|
||||
m_newEntry->setTitle(getCurrentSearch());
|
||||
endSearch();
|
||||
}
|
||||
m_newEntry->setUuid(Uuid::random());
|
||||
m_newEntry->setUsername(m_db->metadata()->defaultUserName());
|
||||
m_newParent = m_groupView->currentGroup();
|
||||
|
@ -493,13 +493,13 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
||||
|
||||
switch (mode) {
|
||||
case DatabaseWidget::ViewMode: {
|
||||
bool inSearch = dbWidget->isInSearchMode();
|
||||
//bool inSearch = dbWidget->isInSearchMode();
|
||||
bool singleEntrySelected = dbWidget->numberOfSelectedEntries() == 1;
|
||||
bool entriesSelected = dbWidget->numberOfSelectedEntries() > 0;
|
||||
bool groupSelected = dbWidget->isGroupSelected();
|
||||
bool recycleBinSelected = dbWidget->isRecycleBinSelected();
|
||||
|
||||
m_ui->actionEntryNew->setEnabled(!inSearch);
|
||||
m_ui->actionEntryNew->setEnabled(true);
|
||||
m_ui->actionEntryClone->setEnabled(singleEntrySelected);
|
||||
m_ui->actionEntryEdit->setEnabled(singleEntrySelected);
|
||||
m_ui->actionEntryDelete->setEnabled(entriesSelected);
|
||||
|
Loading…
Reference in New Issue
Block a user