Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,8 @@ StashDialog::StashDialog(QWidget *parent) :
m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
ui->stashView->setModel(m_proxyModel);
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->stashView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(enableButtons()));
......@@ -212,7 +214,7 @@ void StashDialog::deleteSelection()
QStringList errors;
// Delete in reverse order as stashes rotate
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);
refresh(m_repository, true);
if (!errors.isEmpty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment