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

changing fonts
This commit is contained in:
dragonmacher 2024-10-10 17:52:19 -04:00
parent 065a845d4a
commit 5a56718e4a

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