From 027cd21135f5d64b658aa80e5abcc54a0f3fe972 Mon Sep 17 00:00:00 2001
From: Jan Kozusznik <jan@kozusznik.cz>
Date: Tue, 30 Jan 2018 23:29:52 +0100
Subject: [PATCH] add to UI

---
 .../fiji/haas_spim_benchmark/ui/SPIMPipelineProgressView.fxml | 2 +-
 .../ui/SPIMPipelineProgressViewController.java                | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressView.fxml b/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressView.fxml
index f16482fd..c9ddd86b 100644
--- a/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressView.fxml
+++ b/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressView.fxml
@@ -6,7 +6,7 @@
 
 <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="912.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cz.it4i.fiji.haas_spim_benchmark.ui.SPIMPipelineProgressViewController">
    <center>
-      <TableView fx:id="jobs" prefHeight="400.0" prefWidth="675.0" BorderPane.alignment="CENTER">
+      <TableView fx:id="tasks" prefHeight="400.0" prefWidth="675.0" BorderPane.alignment="CENTER">
         <columns>
           <TableColumn prefWidth="101.0" text="Task name" />
         </columns>
diff --git a/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressViewController.java b/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressViewController.java
index d71b0839..4689fdd8 100644
--- a/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressViewController.java
+++ b/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/ui/SPIMPipelineProgressViewController.java
@@ -39,12 +39,12 @@ public class SPIMPipelineProgressViewController implements FXFrame.Controller {
 
 		});
 		timer = new Timer();
+		registry = new ObservableTaskRegistry(task -> tasks.getItems().remove(registry.get(task)));
+		fillTable();
 	}
 
 	public void setBenchmarkJob(BenchmarkJob job) {
 		this.job = job;
-		registry = new ObservableTaskRegistry(task -> tasks.getItems().remove(registry.get(task)));
-		fillTable();
 	}
 
 	private void fillTable() {
-- 
GitLab