mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 22:47:13 -06:00
Theme Editor:
- save/restore selection when reloading file (if changed outside) - select all text in find field when pressing Ctrl+F - use lighter color for operators (e.g. '=')
This commit is contained in:
@@ -93,6 +93,8 @@ class FlatFindReplaceBar
|
||||
String selectedText = textArea.getSelectedText();
|
||||
if( !StringUtils.isEmpty( selectedText ) && selectedText.indexOf( '\n' ) < 0 )
|
||||
findField.setText( selectedText );
|
||||
else
|
||||
findField.selectAll();
|
||||
|
||||
// if showing bar, highlight matches in editor
|
||||
// (not invoking this from addNotify() because this would break the slide-in animation)
|
||||
|
||||
@@ -185,7 +185,12 @@ class FlatThemeEditorPane
|
||||
}
|
||||
|
||||
try {
|
||||
int selectionStart = textArea.getSelectionStart();
|
||||
int selectionEnd = textArea.getSelectionEnd();
|
||||
|
||||
textArea.reload();
|
||||
|
||||
textArea.select( selectionStart, selectionEnd );
|
||||
} catch( IOException ex ) {
|
||||
JOptionPane.showMessageDialog( this,
|
||||
"Failed to reload '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(),
|
||||
|
||||
Reference in New Issue
Block a user