From b5ca997b2d2a64f955b78208d0362cba0278f8d3 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 11 Feb 2016 12:03:59 -0200 Subject: 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 --- projectionhistory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'projectionhistory.cpp') 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); } -- cgit v1.2.3