diff options
author | Claudio Maradonna <penguyman@stronzi.org> | 2018-07-31 10:53:11 +0200 |
---|---|---|
committer | Claudio Maradonna <penguyman@stronzi.org> | 2018-07-31 10:53:11 +0200 |
commit | 525a1547be89ce9747b15ba67725e3c1a927dbfd (patch) | |
tree | d24c9817df65dd5a69fd35379ea5ab65cc5ad794 /src/mainwindow.cpp | |
parent | 12909eace87742ddd6f9c811f441e60225c699e0 (diff) |
Trying to fix this BUG: when user switch profile and selectionModel has index, you can delete the key anyway
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0e8e5211..cb1b1565 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -787,8 +787,12 @@ void MainWindow::on_profileBox_currentIndexChanged(QString name) { QtPassSettings::getPass()->updateEnv(); + ui->treeView->selectionModel()->clear(); ui->treeView->setRootIndex(proxyModel.mapFromSource( model.setRootPath(QtPassSettings::getPassStore()))); + + ui->actionEdit->setEnabled(false); + ui->actionDelete->setEnabled(false); } /** |