Add "Apply" button to entry and group edit windows (#624)

This commit is contained in:
Jonathan White 2017-06-13 20:55:53 -04:00 committed by GitHub
parent 107684e393
commit 6ffca842e6
8 changed files with 33 additions and 11 deletions

View file

@ -18,6 +18,7 @@
#include "EditWidget.h"
#include "ui_EditWidget.h"
#include <QScrollArea>
#include <QPushButton>
#include "core/FilePath.h"
@ -102,7 +103,10 @@ void EditWidget::setReadOnly(bool readOnly)
m_ui->buttonBox->setStandardButtons(QDialogButtonBox::Close);
}
else {
m_ui->buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
m_ui->buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply);
// Find and connect the apply button
QPushButton* applyButton = m_ui->buttonBox->button(QDialogButtonBox::Apply);
connect(applyButton, SIGNAL(clicked()), SIGNAL(apply()));
}
}