diff --git a/src/dialogs/EditEntryDlg.cpp b/src/dialogs/EditEntryDlg.cpp index c4ab1ba..98f099b 100644 --- a/src/dialogs/EditEntryDlg.cpp +++ b/src/dialogs/EditEntryDlg.cpp @@ -220,7 +220,6 @@ void CEditEntryDlg::OnButtonOK() if(Combo_Group->currentIndex()!=GroupIndex){ db->moveEntry(entry,groups[Combo_Group->currentIndex()]); EntryMoved=true; - ModFlag=true; } if(EntryMoved) diff --git a/src/lib/EntryView.cpp b/src/lib/EntryView.cpp index 965b024..9409bb1 100644 --- a/src/lib/EntryView.cpp +++ b/src/lib/EntryView.cpp @@ -216,9 +216,10 @@ void KeepassEntryView::updateEntry(EntryViewItem* item){ } void KeepassEntryView::editEntry(EntryViewItem* item){ - CEntry old = item->EntryHandle->data(); + IEntryHandle* handle = item->EntryHandle; + CEntry old = handle->data(); - CEditEntryDlg dlg(db,item->EntryHandle,this,true); + CEditEntryDlg dlg(db,handle,this,true); int result = dlg.exec(); switch(result){ case 0: //canceled or no changes @@ -230,14 +231,14 @@ void KeepassEntryView::editEntry(EntryViewItem* item){ //entry moved to another group case 2: //modified case 3: //not modified + Items.removeOne(item); delete item; - Items.removeAt(Items.indexOf(item)); emit fileModified(); break; } IGroupHandle* bGroup; - if ((result==1 || result==2) && config->backup() && item->EntryHandle->group() != (bGroup=db->backupGroup())){ + if ((result==1 || result==2) && config->backup() && handle->group() != (bGroup=db->backupGroup())){ old.LastAccess = QDateTime::currentDateTime(); old.LastMod = old.LastAccess; if (bGroup==NULL)