Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-4998 - Fixed bug that cleared the Byte Viewer 'Address' column when changing fonts

dragonmacher5a56718e4a72
diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java
index 48ee08b02e..d6f279f7bf 100644
--- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java
+++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java
@@ -35,8 +35,7 @@ import ghidra.app.plugin.core.format.*;
import ghidra.app.util.viewer.listingpanel.AddressSetDisplayListener;
import ghidra.program.model.address.AddressSet;
import ghidra.program.model.address.AddressSetView;
-import ghidra.util.HelpLocation;
-import ghidra.util.Msg;
+import ghidra.util.*;
import ghidra.util.exception.InvalidInputException;
import ghidra.util.layout.PairLayout;
import help.Help;
@@ -362,9 +361,8 @@ public class ByteViewerPanel extends JPanel implements LayoutModel, LayoutListen
c.setViewerCursorLocation(info.getBlock(), info.getOffset(), info.getColumn());
}
if (updateViewPosition) {
- Runnable r = () -> indexPanel.setViewerPosition(vp.getIndex(), vp.getXOffset(),
- vp.getYOffset());
- SwingUtilities.invokeLater(r);
+ Swing.runLater(() -> indexPanel.setViewerPosition(vp.getIndex(), vp.getXOffset(),
+ vp.getYOffset()));
}
addingView = false;
}
@@ -614,6 +612,7 @@ public class ByteViewerPanel extends JPanel implements LayoutModel, LayoutListen
c.setFontMetrics(fm);
}
indexFactory = new IndexFieldFactory(fm);
+ updateIndexMap();
indexFactory.setSize(getIndexSizeInChars());
indexPanel.modelSizeChanged(IndexMapper.IDENTITY_MAPPER);
}