Merge remote-tracking branch 'origin/GP-4998-dragonmacher-byte-viewer-font-fix'

This commit is contained in:
Ryan Kurtz 2024-10-11 12:52:27 -04:00
commit 9877d30d94

View File

@ -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);
}