Bug#954658: Updated Patch
Also realised that hitting the cancel button on the settings form
doesn't restore the previous settings within the UI. Have updated the
patch to fix that too.
Aaron
Make sure the frames setting is saved when it's the only setting that's changed.
Restore the previous settings in the setup form when the cancel button is pressed.
Index: qjackctl-0.6.1/src/qjackctlSetupForm.cpp
===================================================================
--- qjackctl-0.6.1.orig/src/qjackctlSetupForm.cpp
+++ qjackctl-0.6.1/src/qjackctlSetupForm.cpp
@@ -1612,7 +1612,7 @@ void qjackctlSetupForm::apply (void)
if (pMainForm == nullptr)
return;
- if (m_iDirtySettings > 0 || m_iDirtyPreset > 0) {
+ if (m_iDirtySettings > 0 || m_iDirtyPreset > 0 || m_iDirtyBuffSize > 0) {
// Save current preset selection.
m_pSetup->sDefPreset = m_ui.PresetComboBox->currentText();
// Always save current settings...
@@ -1908,7 +1908,7 @@ bool qjackctlSetupForm::queryClose (void
bool bQueryClose = true;
// Check if there's any pending changes...
- if (m_iDirtySettings > 0 || m_iDirtyOptions > 0) {
+ if (m_iDirtySettings > 0 || m_iDirtyOptions > 0 || m_iDirtyBuffSize > 0) {
switch (QMessageBox::warning(isVisible() ? this : parentWidget(),
tr("Warning") + " - " QJACKCTL_SUBTITLE1,
tr("Some settings have been changed.\n\n"
@@ -1920,9 +1920,14 @@ bool qjackctlSetupForm::queryClose (void
accept();
// Fall thru...
case QMessageBox::Discard:
+ if (m_pSetup) {
+ setup(m_pSetup);
+ changePreset(m_pSetup->sDefPreset);
+ }
// Reset dirty flags...
m_iDirtySettings = 0;
m_iDirtyOptions = 0;
+ m_iDirtyBuffSize = 0;
break;
default: // Cancel.
bQueryClose = false;
Reply to: