mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 23:37: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
|
@Override
|
||||||
public void actionPerformedImpl( ActionEvent e, RTextArea textArea ) {
|
public void actionPerformedImpl( ActionEvent e, RTextArea textArea ) {
|
||||||
try {
|
try {
|
||||||
int selStartLine = textArea.getLineOfOffset( textArea.getSelectionStart() );
|
int selStart = textArea.getSelectionStart();
|
||||||
int selEndLine = textArea.getLineOfOffset( textArea.getSelectionEnd() );
|
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 linesStart = textArea.getLineStartOffset( selStartLine );
|
||||||
int linesEnd = textArea.getLineEndOffset( selEndLine );
|
int linesEnd = textArea.getLineEndOffset( selEndLine );
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ class FlatThemePreview
|
|||||||
if( comp != previewLabel && comp != enabledCheckBox )
|
if( comp != previewLabel && comp != enabledCheckBox )
|
||||||
comp.setEnabled( enabled );
|
comp.setEnabled( enabled );
|
||||||
|
|
||||||
if( !(comp instanceof Container) )
|
if( !(comp instanceof Container) || comp instanceof JInternalFrame )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for( Component c : ((Container)comp).getComponents() ) {
|
for( Component c : ((Container)comp).getComponents() ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user