Store and restore refresh configuration for memory inspection panes
This commit is contained in:
@@ -87,6 +87,7 @@ namespace Bloom::Widgets
|
|||||||
containerLayout->addWidget(this->hexViewerWidget);
|
containerLayout->addWidget(this->hexViewerWidget);
|
||||||
|
|
||||||
this->setRefreshOnTargetStopEnabled(this->settings.refreshOnTargetStop);
|
this->setRefreshOnTargetStopEnabled(this->settings.refreshOnTargetStop);
|
||||||
|
this->setRefreshOnActivationEnabled(this->settings.refreshOnActivation);
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
this,
|
this,
|
||||||
|
|||||||
@@ -148,6 +148,14 @@ namespace Bloom
|
|||||||
) const {
|
) const {
|
||||||
auto inspectionPaneSettings = Widgets::TargetMemoryInspectionPaneSettings();
|
auto inspectionPaneSettings = Widgets::TargetMemoryInspectionPaneSettings();
|
||||||
|
|
||||||
|
if (jsonObject.contains("refreshOnTargetStop")) {
|
||||||
|
inspectionPaneSettings.refreshOnTargetStop = jsonObject.value("refreshOnTargetStop").toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jsonObject.contains("refreshOnActivation")) {
|
||||||
|
inspectionPaneSettings.refreshOnActivation = jsonObject.value("refreshOnActivation").toBool();
|
||||||
|
}
|
||||||
|
|
||||||
if (jsonObject.contains("hexViewerSettings")) {
|
if (jsonObject.contains("hexViewerSettings")) {
|
||||||
auto& hexViewerSettings = inspectionPaneSettings.hexViewerWidgetSettings;
|
auto& hexViewerSettings = inspectionPaneSettings.hexViewerWidgetSettings;
|
||||||
const auto hexViewerSettingsObj = jsonObject.find("hexViewerSettings")->toObject();
|
const auto hexViewerSettingsObj = jsonObject.find("hexViewerSettings")->toObject();
|
||||||
@@ -326,7 +334,10 @@ namespace Bloom
|
|||||||
QJsonObject InsightProjectSettings::memoryInspectionPaneSettingsToJson(
|
QJsonObject InsightProjectSettings::memoryInspectionPaneSettingsToJson(
|
||||||
const Widgets::TargetMemoryInspectionPaneSettings& inspectionPaneSettings
|
const Widgets::TargetMemoryInspectionPaneSettings& inspectionPaneSettings
|
||||||
) const {
|
) const {
|
||||||
auto settingsObj = QJsonObject();
|
auto settingsObj = QJsonObject({
|
||||||
|
{"refreshOnTargetStop", inspectionPaneSettings.refreshOnTargetStop},
|
||||||
|
{"refreshOnActivation", inspectionPaneSettings.refreshOnActivation},
|
||||||
|
});
|
||||||
|
|
||||||
const auto& hexViewerSettings = inspectionPaneSettings.hexViewerWidgetSettings;
|
const auto& hexViewerSettings = inspectionPaneSettings.hexViewerWidgetSettings;
|
||||||
settingsObj.insert("hexViewerSettings", QJsonObject({
|
settingsObj.insert("hexViewerSettings", QJsonObject({
|
||||||
|
|||||||
Reference in New Issue
Block a user