diff --git a/src/forms/settings/AccountTableForm.cpp b/src/forms/settings/AccountTableForm.cpp index e2594fb..95b7b11 100644 --- a/src/forms/settings/AccountTableForm.cpp +++ b/src/forms/settings/AccountTableForm.cpp @@ -11,6 +11,7 @@ #include "models/User.h" #include "components/SlideTableView.h" #include "event/EventCenter.h" +#include "log/UserOperationLog.h" AccountTableForm::AccountTableForm(QWidget* aParent) : QWidget(aParent) @@ -129,7 +130,9 @@ AccountTableForm::AccountTableForm(QWidget* aParent) if ( DialogManager::Default()->requestAlertMessage(QString(tr("Delete account with ID:\"%1\"!")).arg(id), DialogButtonMode::OkAndCancel) != QDialog::Accepted) return; model->removeRow(mCurrentRow); model->select(); - table->selectRow(model->rowCount() > mCurrentRow + 1 ? mCurrentRow : mCurrentRow - 1); + mCurrentRow = model->rowCount() > mCurrentRow + 1 ? mCurrentRow : mCurrentRow - 1; + table->selectRow(mCurrentRow); + LOG_USER_OPERATION("Delete Account, ID:" + id); }); connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {