Skip to content

Commit

Permalink
Delete duplicate call of view.rebuild. Return calling newPacket in Pl…
Browse files Browse the repository at this point in the history
…atform.runLater to fix uiTests
  • Loading branch information
hedjuo committed Oct 25, 2016
1 parent ac31e48 commit e6b8804
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.google.inject.name.Named;
import com.xored.javafx.packeteditor.data.FieldEditorModel;
import com.xored.javafx.packeteditor.data.combined.CombinedField;
import com.xored.javafx.packeteditor.data.combined.CombinedProtocolModel;
import com.xored.javafx.packeteditor.data.user.DocumentFile;
import com.xored.javafx.packeteditor.events.RebuildViewEvent;
import com.xored.javafx.packeteditor.scapy.PacketData;
Expand Down Expand Up @@ -77,7 +76,7 @@ public IMetadataService getMetadataService() {
public void initialize(URL location, ResourceBundle resources) {
view.setParentPane(fieldEditorPane);
if (packetController.isInitialized()) {
this.newPacket();
Platform.runLater(this::newPacket);
} else {
view.displayConnectionError();
}
Expand Down Expand Up @@ -122,11 +121,7 @@ public void handleRebuildViewEvent(RebuildViewEvent event) {
fieldEditorTopPane.getChildren().add(snapView);
// Rebuild content
view.rebuild(event.getModel());
CombinedProtocolModel combomodel = event.getModel();

// Rebuild content
view.rebuild(combomodel);


Platform.runLater(()-> {
// Save scroll position workaround: runLater inside runLater :)
Platform.runLater(() -> {
Expand Down

0 comments on commit e6b8804

Please sign in to comment.