Fix - when accessing and existing settings making no changes do not show Save? popup
This commit is contained in:
parent
73f75ac3d9
commit
f8a4f73993
3 changed files with 22 additions and 2 deletions
|
|
@ -304,7 +304,7 @@ void SettingsCore::setSelf(QSharedPointer<SettingsCore> me) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackGainChanged, [this](const float value) {
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackGainChanged, [this](const float value) {
|
||||||
mSettingsModelConnection->invokeToCore([this, value]() { setPlaybackGain(value); });
|
mSettingsModelConnection->invokeToCore([this, value]() { setPlaybackGainFromModel(value); });
|
||||||
});
|
});
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lSetCaptureGain, [this](const float value) {
|
mSettingsModelConnection->makeConnectToCore(&SettingsCore::lSetCaptureGain, [this](const float value) {
|
||||||
|
|
@ -314,7 +314,7 @@ void SettingsCore::setSelf(QSharedPointer<SettingsCore> me) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureGainChanged, [this](const float value) {
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureGainChanged, [this](const float value) {
|
||||||
mSettingsModelConnection->invokeToCore([this, value]() { setCaptureGain(value); });
|
mSettingsModelConnection->invokeToCore([this, value]() { setCaptureGainFromModel(value); });
|
||||||
});
|
});
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::micVolumeChanged, [this](const float value) {
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::micVolumeChanged, [this](const float value) {
|
||||||
|
|
@ -767,6 +767,13 @@ void SettingsCore::setCaptureGain(float gain) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsCore::setCaptureGainFromModel(float gain) {
|
||||||
|
if (mCaptureGain != gain) {
|
||||||
|
mCaptureGain = gain;
|
||||||
|
emit captureGainChanged(gain);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QVariantMap SettingsCore::getConferenceLayout() const {
|
QVariantMap SettingsCore::getConferenceLayout() const {
|
||||||
return mConferenceLayout;
|
return mConferenceLayout;
|
||||||
}
|
}
|
||||||
|
|
@ -811,6 +818,13 @@ void SettingsCore::setPlaybackGain(float gain) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsCore::setPlaybackGainFromModel(float gain) {
|
||||||
|
if (mPlaybackGain != gain) {
|
||||||
|
mPlaybackGain = gain;
|
||||||
|
emit playbackGainChanged(gain);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QVariantMap SettingsCore::getCaptureDevice() const {
|
QVariantMap SettingsCore::getCaptureDevice() const {
|
||||||
return mCaptureDevice;
|
return mCaptureDevice;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -144,9 +144,11 @@ public:
|
||||||
|
|
||||||
float getPlaybackGain() const;
|
float getPlaybackGain() const;
|
||||||
void setPlaybackGain(float gain);
|
void setPlaybackGain(float gain);
|
||||||
|
void setPlaybackGainFromModel(float gain);
|
||||||
|
|
||||||
float getCaptureGain() const;
|
float getCaptureGain() const;
|
||||||
void setCaptureGain(float gain);
|
void setCaptureGain(float gain);
|
||||||
|
void setCaptureGainFromModel(float gain);
|
||||||
|
|
||||||
QVariantList getCaptureDevices() const;
|
QVariantList getCaptureDevices() const;
|
||||||
void setCaptureDevices(QVariantList devices);
|
void setCaptureDevices(QVariantList devices);
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,8 @@ AbstractSettingsMenu {
|
||||||
qsTr("contact_editor_dialog_abort_confirmation_save")
|
qsTr("contact_editor_dialog_abort_confirmation_save")
|
||||||
)
|
)
|
||||||
} else {mainItem.goBack()}
|
} else {mainItem.goBack()}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
SettingsCpp.isSaved = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue