Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 597:f03bc1d38cac
Make "Select All" select the whole span of everything that exists, not just the main model (toward SF bug #243 Copied Time Instant Layer does not include instant at end of track)
author | Chris Cannam |
---|---|
date | Thu, 19 Apr 2018 13:17:42 +0100 |
parents | b23bebfdfaba |
children | a558a3fb44fc |
comparison
equal
deleted
inserted
replaced
596:c99892f0c5c3 | 597:f03bc1d38cac |
---|---|
840 { | 840 { |
841 updateMenuStates(); | 841 updateMenuStates(); |
842 updateVisibleRangeDisplay(p); | 842 updateVisibleRangeDisplay(p); |
843 } | 843 } |
844 | 844 |
845 sv_frame_t | |
846 MainWindowBase::getModelsStartFrame() const | |
847 { | |
848 sv_frame_t startFrame = 0; | |
849 if (!m_paneStack) return startFrame; | |
850 for (int i = 0; i < m_paneStack->getPaneCount(); ++i) { | |
851 sv_frame_t thisStart = m_paneStack->getPane(i)->getModelsStartFrame(); | |
852 if (i == 0 || thisStart < startFrame) { | |
853 startFrame = thisStart; | |
854 } | |
855 } | |
856 return startFrame; | |
857 } | |
858 | |
859 sv_frame_t | |
860 MainWindowBase::getModelsEndFrame() const | |
861 { | |
862 sv_frame_t endFrame = 0; | |
863 if (!m_paneStack) return endFrame; | |
864 for (int i = 0; i < m_paneStack->getPaneCount(); ++i) { | |
865 sv_frame_t thisEnd = m_paneStack->getPane(i)->getModelsEndFrame(); | |
866 if (i == 0 || thisEnd > endFrame) { | |
867 endFrame = thisEnd; | |
868 } | |
869 } | |
870 return endFrame; | |
871 } | |
872 | |
845 void | 873 void |
846 MainWindowBase::selectAll() | 874 MainWindowBase::selectAll() |
847 { | 875 { |
848 if (!getMainModel()) return; | 876 if (!getMainModel()) return; |
849 m_viewManager->setSelection(Selection(getMainModel()->getStartFrame(), | 877 m_viewManager->setSelection(Selection(getModelsStartFrame(), |
850 getMainModel()->getEndFrame())); | 878 getModelsEndFrame())); |
851 } | 879 } |
852 | 880 |
853 void | 881 void |
854 MainWindowBase::selectToStart() | 882 MainWindowBase::selectToStart() |
855 { | 883 { |