Commit 0dd30210 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

VCS[git]: Stashdialog: Fix broken remove.

Used the wrong indexes, set focus option.
parent b9b9f752
...@@ -134,6 +134,8 @@ StashDialog::StashDialog(QWidget *parent) : ...@@ -134,6 +134,8 @@ StashDialog::StashDialog(QWidget *parent) :
m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
ui->stashView->setModel(m_proxyModel); ui->stashView->setModel(m_proxyModel);
ui->stashView->setSelectionMode(QAbstractItemView::MultiSelection); ui->stashView->setSelectionMode(QAbstractItemView::MultiSelection);
ui->stashView->setAllColumnsShowFocus(true);
ui->stashView->setUniformRowHeights(true);
connect(ui->filterLineEdit, SIGNAL(filterChanged(QString)), m_proxyModel, SLOT(setFilterFixedString(QString))); connect(ui->filterLineEdit, SIGNAL(filterChanged(QString)), m_proxyModel, SLOT(setFilterFixedString(QString)));
connect(ui->stashView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), connect(ui->stashView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(enableButtons())); this, SLOT(enableButtons()));
...@@ -212,7 +214,7 @@ void StashDialog::deleteSelection() ...@@ -212,7 +214,7 @@ void StashDialog::deleteSelection()
QStringList errors; QStringList errors;
// Delete in reverse order as stashes rotate // Delete in reverse order as stashes rotate
for (int r = rows.size() - 1; r >= 0; r--) for (int r = rows.size() - 1; r >= 0; r--)
if (!gitClient()->synchronousStashRemove(m_repository, m_model->at(r).name, &errorMessage)) if (!gitClient()->synchronousStashRemove(m_repository, m_model->at(rows.at(r)).name, &errorMessage))
errors.push_back(errorMessage); errors.push_back(errorMessage);
refresh(m_repository, true); refresh(m_repository, true);
if (!errors.isEmpty()) if (!errors.isEmpty())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment