Skip to content

Commit f675c1a

Browse files
committed
#178: fix bug where manually added row was creating inconsistent validation (e.g. save button disabled besides everything valid)
1 parent 58aefe3 commit f675c1a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,11 @@ public void initForDate(LocalDate currentReportDate, List<Work> currentWorkItems
201201
.bind(heimatTaskComboBox.getSelectionModel().selectedItemProperty().isNull());
202202
addHeimatTaskButton.setOnAction(ae -> {
203203
final HeimatTask task = heimatTaskComboBox.getValue();
204-
items.add(new TableRow(new HeimatController.Mapping(task.id(), true, true,
204+
final TableRow addedRow = new TableRow(new HeimatController.Mapping(task.id(), true, true,
205205
"Manually added\n\n" + task.name() + "\n(" + task.taskHolderName() + ")", List.of(), List.of(), "", "",
206-
0, 0), "", 0));
206+
0, 0), "", 0);
207+
items.add(addedRow);
208+
items2.add(addedRow); // add new row also to items2 - as it is not added automatically :(
207209
heimatTaskComboBox.getSelectionModel().clearSelection();
208210
});
209211

0 commit comments

Comments
 (0)