Skip to content

Commit

Permalink
Fix for PeerComponent text selection
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Feb 21, 2024
1 parent 749b014 commit 71c7462
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ public PeerComponent(PeerGUI manager, Convex value) {
}

manager.tickState.addPropertyChangeListener(e->{
// Set text while maintaining selection
int ss=description.getSelectionStart();
int se=description.getSelectionEnd();
description.setText(getPeerDescription());
description.select(ss, se);
});

}
Expand Down

0 comments on commit 71c7462

Please sign in to comment.