comparison framework/MainWindowBase.cpp @ 127:7ee6da3f2b3c

* a bit of progress on retaining current row when sorting changes &c
author Chris Cannam
date Tue, 17 Jun 2008 16:07:56 +0000
parents d615d0220828
children 09e6016c5436
comparison
equal deleted inserted replaced
126:d615d0220828 127:7ee6da3f2b3c
1975 dialog->setAttribute(Qt::WA_DeleteOnClose); // see below 1975 dialog->setAttribute(Qt::WA_DeleteOnClose); // see below
1976 1976
1977 connect(m_viewManager, 1977 connect(m_viewManager,
1978 SIGNAL(globalCentreFrameChanged(unsigned long)), 1978 SIGNAL(globalCentreFrameChanged(unsigned long)),
1979 dialog, 1979 dialog,
1980 SLOT(scrollToFrameRequested(unsigned long))); 1980 SLOT(userScrolledToFrame(unsigned long)));
1981 /* 1981
1982 connect(m_viewManager, 1982 connect(m_viewManager,
1983 SIGNAL(playbackFrameChanged(unsigned long)), 1983 SIGNAL(playbackFrameChanged(unsigned long)),
1984 dialog, 1984 dialog,
1985 SLOT(scrollToFrameRequested(unsigned long))); 1985 SLOT(playbackScrolledToFrame(unsigned long)));
1986 */ 1986
1987 connect(dialog, 1987 connect(dialog,
1988 SIGNAL(scrollToFrame(unsigned long)), 1988 SIGNAL(scrollToFrame(unsigned long)),
1989 m_viewManager, 1989 m_viewManager,
1990 SLOT(setGlobalCentreFrame(unsigned long))); 1990 SLOT(setGlobalCentreFrame(unsigned long)));
1991 1991
2129 std::cerr << "MainWindowBase::viewCentreFrameChanged(" << v << "," << frame << ")" << std::endl; 2129 std::cerr << "MainWindowBase::viewCentreFrameChanged(" << v << "," << frame << ")" << std::endl;
2130 2130
2131 if (m_viewDataDialogMap.find(v) != m_viewDataDialogMap.end()) { 2131 if (m_viewDataDialogMap.find(v) != m_viewDataDialogMap.end()) {
2132 for (DataDialogSet::iterator i = m_viewDataDialogMap[v].begin(); 2132 for (DataDialogSet::iterator i = m_viewDataDialogMap[v].begin();
2133 i != m_viewDataDialogMap[v].end(); ++i) { 2133 i != m_viewDataDialogMap[v].end(); ++i) {
2134 std::cerr << "found dialog" << std::endl; 2134 (*i)->userScrolledToFrame(frame);
2135 (*i)->scrollToFrameRequested(frame);
2136 } 2135 }
2137 } 2136 }
2138 if ((m_playSource && m_playSource->isPlaying()) || !getMainModel()) return; 2137 if ((m_playSource && m_playSource->isPlaying()) || !getMainModel()) return;
2139 Pane *p = 0; 2138 Pane *p = 0;
2140 if (!m_paneStack || !(p = m_paneStack->getCurrentPane())) return; 2139 if (!m_paneStack || !(p = m_paneStack->getCurrentPane())) return;