CutViewerView communicates with SliceViewer(Presenter) #38102
Labels
ISIS Team: Core
Issue and pull requests managed by the Core subteam at ISIS
Maintenance
Unassigned issues to be addressed in the next maintenance period.
Describe the outcome that is desired.
The CutViewerView class is passed a SliceViewer(Presenter) object in its constructor. This is a problem because the CutViewerView should only communicate with the CutViewerPresenter so that it is not dependent on a second presenter.
Ideally, the presenters are the medium through which the View and Model should communicate with other objects. So the CutViewerView should communicate with the CutViewerPresenter, and then the CutViewerPresenter is allowed to communicate with the SliceViewer(Presenter) object.
mantid/qt/python/mantidqt/mantidqt/widgets/sliceviewer/cutviewer/view.py
Line 24 in eb3ee01
Describe any solutions you are considering
The CutViewerView should not communicate directly with the SliceViewer(Presenter) class. It should instead communicate with the CutViewerPresenter, and then the CutViewerPresenter can communicate with the SliceViewer(Presenter).
I would recommend creating a
subscribe_presenter
method on the CutViewerView so that the CutViewerPresenter can be notified when an event happens.Another bug bear of mine is the name of the SliceViewer class. Its not clear if it is a Presenter from the name. Optional bonus to rename this class!
Acceptance Criteria
The text was updated successfully, but these errors were encountered: