mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Theme Editor:
- fixed duplicate lines action if selection includes line separator at the end - preview: do not disable internal components of JInternalFrame
This commit is contained in:
@@ -122,8 +122,15 @@ class FlatSyntaxTextAreaActions
|
||||
@Override
|
||||
public void actionPerformedImpl( ActionEvent e, RTextArea textArea ) {
|
||||
try {
|
||||
int selStartLine = textArea.getLineOfOffset( textArea.getSelectionStart() );
|
||||
int selEndLine = textArea.getLineOfOffset( textArea.getSelectionEnd() );
|
||||
int selStart = textArea.getSelectionStart();
|
||||
int selEnd = textArea.getSelectionEnd();
|
||||
|
||||
int selStartLine = textArea.getLineOfOffset( selStart );
|
||||
int selEndLine = textArea.getLineOfOffset( selEnd );
|
||||
|
||||
// check whether selection end is at the beginning of the next line
|
||||
if( selEnd > selStart && textArea.getLineOfOffset( selEnd - 1 ) < selEndLine )
|
||||
selEndLine--;
|
||||
|
||||
int linesStart = textArea.getLineStartOffset( selStartLine );
|
||||
int linesEnd = textArea.getLineEndOffset( selEndLine );
|
||||
|
||||
@@ -271,7 +271,7 @@ class FlatThemePreview
|
||||
if( comp != previewLabel && comp != enabledCheckBox )
|
||||
comp.setEnabled( enabled );
|
||||
|
||||
if( !(comp instanceof Container) )
|
||||
if( !(comp instanceof Container) || comp instanceof JInternalFrame )
|
||||
return;
|
||||
|
||||
for( Component c : ((Container)comp).getComponents() ) {
|
||||
|
||||
Reference in New Issue
Block a user