diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-11 12:03:59 -0200 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-11 12:03:59 -0200 |
commit | b5ca997b2d2a64f955b78208d0362cba0278f8d3 (patch) | |
tree | 0dbd235d7c91c11968946142e8ed7df155471c7e /projectionhistory.cpp | |
parent | ff08c0541156faf8a220a62b4192a80803b86da3 (diff) |
Modified the way the history interacts with other components.
* Main class is now responsible for updating map components
whenever the current map changes (even rewinding): this simplifies
other objects because they don't have to know anything about how
the data is being displayed later (no CP/RP juggling everywhere)
* Added undo/reset actions to main view, including menu items
* ProjectionHistory now has specific signals for each change
happening to the history
Diffstat (limited to 'projectionhistory.cpp')
-rw-r--r-- | projectionhistory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/projectionhistory.cpp b/projectionhistory.cpp index 24bf34e..bd55431 100644 --- a/projectionhistory.cpp +++ b/projectionhistory.cpp @@ -13,17 +13,17 @@ void ProjectionHistory::undo() m_hasPrev = false; m_Y = m_prevY; - emit historyChanged(m_Y); + emit undoPerformed(m_Y); } } -void ProjectionHistory::undoAll() +void ProjectionHistory::reset() { if (m_hasFirst) { m_hasPrev = false; m_Y = m_firstY; - emit historyChanged(m_Y); + emit resetPerformed(m_Y); } } @@ -41,5 +41,5 @@ void ProjectionHistory::addMap(const arma::mat &Y) m_firstY = m_Y; } - emit historyChanged(m_Y); + emit mapAdded(m_Y); } |