Archived
0

fix profile update on change market

This commit is contained in:
Mo
2016-04-26 18:11:12 +03:00
parent c20f229c57
commit 084afeff11
2 changed files with 2 additions and 2 deletions

View File

@@ -310,6 +310,7 @@ public class MainController {
if (world != null) world.getModeler().clear();
world = new MarketModel(World.getMarket());
market = world;
profile = world.getModeler().get(ModelFabric.get(profile));
Screeners.reinitAll();
}

View File

@@ -9,7 +9,6 @@ import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.layout.Pane;
import javafx.util.StringConverter;
import org.controlsfx.glyphfont.Glyph;
import ru.trader.Main;
import ru.trader.ServicesManager;
import ru.trader.core.Engine;
@@ -67,7 +66,6 @@ public class ProfileController {
@FXML
private void initialize() {
init();
profile = MainController.getProfile();
system.valueProperty().addListener((ov, o, n) -> {
doAndConsumeChanges(() -> {
station.setItems(n.getStationNamesList());
@@ -126,6 +124,7 @@ public class ProfileController {
}
void init(){
profile = MainController.getProfile();
MarketModel world = MainController.getWorld();
world.getNotificator().add(marketChangeListener);
SystemsProvider provider = world.getSystemsProvider();