Changeset 336 for trunk/src/org/expeditee/items/Text.java
- Timestamp:
- 09/26/08 13:03:26 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Text.java
r324 r336 602 602 if (text.charAt(0) == KeyEvent.VK_BACK_SPACE) { 603 603 if (hasSelection()) { 604 cutSelectedText(); 605 clearSelection(); 604 pos = deleteSelection(pos); 606 605 } else if (insertPos > 0) { 607 606 deleteChar(insertPos - 1); … … 612 611 } else if (text.charAt(0) == KeyEvent.VK_DELETE) { 613 612 if (hasSelection()) { 614 cutSelectedText(); 615 clearSelection(); 613 pos = deleteSelection(pos); 616 614 } else if (insertPos < _text.length()) { 617 615 deleteChar(insertPos); … … 719 717 } 720 718 719 /** 720 * @param pos 721 * @return 722 */ 723 private int deleteSelection(int pos) { 724 int selectionLength = getSelectionSize(); 725 cutSelectedText(); 726 clearSelection(); 727 pos -= selectionLength; 728 return pos; 729 } 730 721 731 public Point2D.Float moveCursor(int direction, float mouseX, float mouseY, 722 732 boolean setSelection) {
Note:
See TracChangeset
for help on using the changeset viewer.