Skip to content

Commit

Permalink
Fixed issue #603.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Aug 30, 2017
1 parent 358a64b commit fcfa34a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/org/nschmidt/ldparteditor/widgets/BigDecimalSpinner.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void mouseScrolled(MouseEvent e) {
selectAll = false;
new Thread( () -> {
focus = true;
while (focus) {
while (focus && !txt_val[0].isDisposed()) {
try {
Thread.sleep(100);
} catch (InterruptedException ie) {}
Expand Down Expand Up @@ -234,7 +234,7 @@ public void modifyText(ModifyEvent e) {
new Thread(() -> {
final int id = counter.getAndIncrement() + 1;
focus = true;
while (focus && counter.compareAndSet(id, id) && !forceUpdate) {
while (focus && counter.compareAndSet(id, id) && !forceUpdate && !txt_val[0].isDisposed()) {
Display.getDefault().asyncExec(() -> {
try {
focus = txt_val[0].isFocusControl();
Expand Down
4 changes: 2 additions & 2 deletions src/org/nschmidt/ldparteditor/widgets/IntegerSpinner.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void mouseScrolled(MouseEvent e) {
selectAll = false;
new Thread( () -> {
focus = true;
while (focus) {
while (focus && !txt_val[0].isDisposed()) {
try {
Thread.sleep(100);
} catch (InterruptedException ie) {}
Expand Down Expand Up @@ -197,7 +197,7 @@ public void modifyText(ModifyEvent e) {
new Thread( () -> {
final int id = counter.getAndIncrement() + 1;
focus = true;
while (focus && counter.compareAndSet(id, id) && !forceUpdate) {
while (focus && counter.compareAndSet(id, id) && !forceUpdate && !txt_val[0].isDisposed()) {
Display.getDefault().asyncExec(() -> {
try {
focus = txt_val[0].isFocusControl();
Expand Down

0 comments on commit fcfa34a

Please sign in to comment.