Moved ownership of hex viewer settings to TargetMemoryInspectionPane and corrected default settings
This commit is contained in:
@@ -12,6 +12,7 @@ using Bloom::Targets::TargetMemoryDescriptor;
|
||||
|
||||
HexViewerWidget::HexViewerWidget(
|
||||
const TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||
HexViewerWidgetSettings& settings,
|
||||
std::vector<FocusedMemoryRegion>& focusedMemoryRegions,
|
||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||
InsightWorker& insightWorker,
|
||||
@@ -19,6 +20,7 @@ HexViewerWidget::HexViewerWidget(
|
||||
):
|
||||
QWidget(parent),
|
||||
targetMemoryDescriptor(targetMemoryDescriptor),
|
||||
settings(settings),
|
||||
focusedMemoryRegions(focusedMemoryRegions),
|
||||
excludedMemoryRegions(excludedMemoryRegions),
|
||||
insightWorker(insightWorker)
|
||||
@@ -74,9 +76,9 @@ HexViewerWidget::HexViewerWidget(
|
||||
);
|
||||
this->byteItemGraphicsScene = this->byteItemGraphicsView->getScene();
|
||||
|
||||
this->setStackMemoryHighlightingEnabled(true);
|
||||
this->setHoveredRowAndColumnHighlightingEnabled(true);
|
||||
this->setFocusedMemoryHighlightingEnabled(true);
|
||||
this->setStackMemoryHighlightingEnabled(this->settings.highlightStackMemory);
|
||||
this->setHoveredRowAndColumnHighlightingEnabled(this->settings.highlightHoveredRowAndCol);
|
||||
this->setFocusedMemoryHighlightingEnabled(this->settings.highlightFocusedMemory);
|
||||
|
||||
QObject::connect(
|
||||
this->highlightStackMemoryButton,
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace Bloom::Widgets
|
||||
|
||||
HexViewerWidget(
|
||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||
HexViewerWidgetSettings& settings,
|
||||
std::vector<FocusedMemoryRegion>& focusedMemoryRegions,
|
||||
std::vector<ExcludedMemoryRegion>& excludedMemoryRegions,
|
||||
InsightWorker& insightWorker,
|
||||
@@ -52,7 +53,7 @@ namespace Bloom::Widgets
|
||||
|
||||
InsightWorker& insightWorker;
|
||||
|
||||
HexViewerWidgetSettings settings = HexViewerWidgetSettings();
|
||||
HexViewerWidgetSettings& settings;
|
||||
|
||||
QWidget* container = nullptr;
|
||||
QWidget* toolBar = nullptr;
|
||||
|
||||
@@ -4,9 +4,9 @@ namespace Bloom::Widgets
|
||||
{
|
||||
struct HexViewerWidgetSettings
|
||||
{
|
||||
bool highlightStackMemory = false;
|
||||
bool highlightFocusedMemory = false;
|
||||
bool highlightHoveredRowAndCol = false;
|
||||
bool highlightStackMemory = true;
|
||||
bool highlightFocusedMemory = true;
|
||||
bool highlightHoveredRowAndCol = true;
|
||||
bool displayAsciiValues = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ TargetMemoryInspectionPane::TargetMemoryInspectionPane(
|
||||
this->manageMemoryRegionsButton = this->container->findChild<SvgToolButton*>("manage-memory-regions-btn");
|
||||
this->hexViewerWidget = new HexViewerWidget(
|
||||
this->targetMemoryDescriptor,
|
||||
this->settings.hexViewerWidgetSettings,
|
||||
this->settings.focusedMemoryRegions,
|
||||
this->settings.excludedMemoryRegions,
|
||||
this->insightWorker,
|
||||
|
||||
Reference in New Issue
Block a user