Skip to content

Commit cce062b

Browse files
committed
changed color on ProjectChange
1 parent 1dcfb6e commit cce062b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/de/doubleslash/keeptime/view/ManageWorkController.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public void changed(final ObservableValue<? extends String> observable, final St
242242
Platform.runLater(() -> {
243243
isValidProject = true;
244244
projectComboBox.getEditor().selectAll();
245+
setColor(projectComboBox, projectComboBox.getValue().getColor());
245246
});
246247

247248
return;
@@ -273,9 +274,11 @@ public void changed(final ObservableValue<? extends String> observable, final St
273274
public void changed(final ObservableValue<? extends Boolean> observable, final Boolean oldIsFocused,
274275
final Boolean newIsFocused) {
275276
if (newIsFocused) {
277+
// needed to avoid exception on empty textfield https://bugs.openjdk.java.net/browse/JDK-8081700
276278
Platform.runLater(() -> projectComboBox.getEditor().selectAll());
277279
} else {
278-
projectComboBox.hide();
280+
// needed to avoid exception on empty textfield https://bugs.openjdk.java.net/browse/JDK-8081700
281+
Platform.runLater(() -> projectComboBox.hide());
279282
}
280283

281284
}

0 commit comments

Comments
 (0)