# HG changeset patch # User Chris Cannam # Date 1176736570 0 # Node ID 90122740323f922fac0adbcba4f1e083d9454d69 # Parent efadb9d2b2c6cb9f90e9320860eceea3d968ea9a * Fix alignment of new pane added after play position has changed (but global centre frame has not been explicitly moved) diff -r efadb9d2b2c6 -r 90122740323f view/View.cpp --- a/view/View.cpp Mon Apr 16 12:20:27 2007 +0000 +++ b/view/View.cpp Mon Apr 16 15:16:10 2007 +0000 @@ -556,12 +556,6 @@ } m_manager = manager; - if (m_followPlay != PlaybackIgnore) { - setCentreFrame(m_manager->getPlaybackFrame(), false); - } else if (m_followPan) { - setCentreFrame(m_manager->getGlobalCentreFrame(), false); - } - if (m_followZoom) setZoomLevel(m_manager->getGlobalZoom()); connect(m_manager, SIGNAL(globalCentreFrameChanged(unsigned long)), this, SLOT(globalCentreFrameChanged(unsigned long))); @@ -592,6 +586,15 @@ connect(this, SIGNAL(zoomLevelChanged(unsigned long, bool)), m_manager, SLOT(viewZoomLevelChanged(unsigned long, bool))); + if (m_followPlay != PlaybackIgnore) { +// std::cerr << "View::setViewManager: setting centre frame to playback frame: " << m_manager->getPlaybackFrame() << std::endl; + setCentreFrame(m_manager->getPlaybackFrame(), false); + } else if (m_followPan) { +// std::cerr << "View::setViewManager: setting centre frame to global centre frame: " << m_manager->getGlobalCentreFrame() << std::endl; + setCentreFrame(m_manager->getGlobalCentreFrame(), false); + } + if (m_followZoom) setZoomLevel(m_manager->getGlobalZoom()); + toolModeChanged(); } @@ -1188,7 +1191,7 @@ View::paintEvent(QPaintEvent *e) { // Profiler prof("View::paintEvent", false); -// std::cerr << "View::paintEvent" << std::endl; +// std::cerr << "View::paintEvent: centre frame is " << m_centreFrame << std::endl; if (m_layers.empty()) { QFrame::paintEvent(e);