Commit 288afe9b authored by MarkG's avatar MarkG Committed by TIGERs GitLab
Browse files

[bugfix] Only call onStart, etc. once in replay windows

See merge request main/Sumatra!1526

sumatra-commit: 1f480f5f9ca032d8656850dc0586d2f740599245
parent ee83d215
Pipeline #17760 passed with stage
in 8 minutes and 50 seconds
......@@ -43,7 +43,9 @@ public abstract class ASumatraView
getView().setComponent(presenter.getViewPanel());
if (mode == EViewMode.NORMAL)
{
ModuliStateAdapter.getInstance().addObserver(presenter);
ModuliStateAdapter stateAdapter = ModuliStateAdapter.getInstance();
presenter.getChildPresenters().forEach(stateAdapter::addObserver);
stateAdapter.addObserver(presenter);
}
log.trace("Presenter created for view {}", type.getTitle());
}
......
......@@ -31,7 +31,6 @@ public interface ISumatraPresenter extends IModuliStateObserver
*/
default void onStartModuli()
{
getChildPresenters().forEach(ISumatraPresenter::onStartModuli);
}
......@@ -40,7 +39,6 @@ public interface ISumatraPresenter extends IModuliStateObserver
*/
default void onStopModuli()
{
getChildPresenters().forEach(ISumatraPresenter::onStopModuli);
}
......@@ -49,7 +47,6 @@ public interface ISumatraPresenter extends IModuliStateObserver
*/
default void onStart()
{
getChildPresenters().forEach(ISumatraPresenter::onStart);
}
/**
......@@ -57,7 +54,6 @@ public interface ISumatraPresenter extends IModuliStateObserver
*/
default void onStop()
{
getChildPresenters().forEach(ISumatraPresenter::onStop);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment