fixed focus in binary/hex mode
This commit is contained in:
parent
a1b110628a
commit
cabaa8e6e6
@ -810,6 +810,7 @@ public class FileEditor extends JFrame {
|
||||
}
|
||||
hexControlPanel.setVisible(true);
|
||||
northPanel.revalidate();
|
||||
SwingUtilities.invokeLater(() -> textArea.requestFocusInWindow());
|
||||
} else {
|
||||
// switch back to text view if possible
|
||||
// close RA if open
|
||||
@ -971,6 +972,7 @@ public class FileEditor extends JFrame {
|
||||
if (hexControlPanel.getParent() == null) northPanel.add(hexControlPanel);
|
||||
hexControlPanel.setVisible(true);
|
||||
northPanel.revalidate();
|
||||
SwingUtilities.invokeLater(() -> textArea.requestFocusInWindow());
|
||||
} else if (hexMode) {
|
||||
buildHexViewText(0L);
|
||||
} else {
|
||||
@ -1024,6 +1026,7 @@ public class FileEditor extends JFrame {
|
||||
textArea.setEditable(false);
|
||||
textArea.setFont(new Font("Monospaced", Font.PLAIN, textArea.getFont().getSize()));
|
||||
hexMode = true;
|
||||
SwingUtilities.invokeLater(() -> textArea.requestFocusInWindow());
|
||||
} else {
|
||||
// Small or text file: load fully
|
||||
fileBytes = Files.readAllBytes(file.toPath());
|
||||
@ -1037,6 +1040,7 @@ public class FileEditor extends JFrame {
|
||||
if (hexControlPanel.getParent() == null) northPanel.add(hexControlPanel);
|
||||
hexControlPanel.setVisible(true);
|
||||
northPanel.revalidate();
|
||||
SwingUtilities.invokeLater(() -> textArea.requestFocusInWindow());
|
||||
} else if (hexMode) {
|
||||
buildHexViewText(0L);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user