Mercurial > hg > svgui
comparison view/Pane.cpp @ 217:bd2d0346da0e
* Inhibit making and displaying time selections in slice layers
author | Chris Cannam |
---|---|
date | Mon, 05 Mar 2007 10:53:41 +0000 |
parents | e554ab9a4408 |
children | cd81066ac7ad |
comparison
equal
deleted
inserted
replaced
216:34bbbcb3c01f | 217:bd2d0346da0e |
---|---|
810 m_dragStartMinValue = dmin; | 810 m_dragStartMinValue = dmin; |
811 } | 811 } |
812 | 812 |
813 } else if (mode == ViewManager::SelectMode) { | 813 } else if (mode == ViewManager::SelectMode) { |
814 | 814 |
815 if (!hasTopLayerTimeXAxis()) return; | |
816 | |
815 bool closeToLeft = false, closeToRight = false; | 817 bool closeToLeft = false, closeToRight = false; |
816 Selection selection = getSelectionAt(e->x(), closeToLeft, closeToRight); | 818 Selection selection = getSelectionAt(e->x(), closeToLeft, closeToRight); |
817 | 819 |
818 if ((closeToLeft || closeToRight) && !(closeToLeft && closeToRight)) { | 820 if ((closeToLeft || closeToRight) && !(closeToLeft && closeToRight)) { |
819 | 821 |
906 | 908 |
907 zoomToRegion(x0, y0, x1, y1); | 909 zoomToRegion(x0, y0, x1, y1); |
908 } | 910 } |
909 | 911 |
910 } else if (mode == ViewManager::SelectMode) { | 912 } else if (mode == ViewManager::SelectMode) { |
913 | |
914 if (!hasTopLayerTimeXAxis()) return; | |
911 | 915 |
912 if (m_manager && m_manager->haveInProgressSelection()) { | 916 if (m_manager && m_manager->haveInProgressSelection()) { |
913 | 917 |
914 bool exclusive; | 918 bool exclusive; |
915 Selection selection = m_manager->getInProgressSelection(exclusive); | 919 Selection selection = m_manager->getInProgressSelection(exclusive); |
968 QPoint prevPoint = m_identifyPoint; | 972 QPoint prevPoint = m_identifyPoint; |
969 m_identifyPoint = e->pos(); | 973 m_identifyPoint = e->pos(); |
970 | 974 |
971 if (!m_clickedInRange) { | 975 if (!m_clickedInRange) { |
972 | 976 |
973 if (mode == ViewManager::SelectMode) { | 977 if (mode == ViewManager::SelectMode && hasTopLayerTimeXAxis()) { |
974 bool closeToLeft = false, closeToRight = false; | 978 bool closeToLeft = false, closeToRight = false; |
975 getSelectionAt(e->x(), closeToLeft, closeToRight); | 979 getSelectionAt(e->x(), closeToLeft, closeToRight); |
976 if ((closeToLeft || closeToRight) && !(closeToLeft && closeToRight)) { | 980 if ((closeToLeft || closeToRight) && !(closeToLeft && closeToRight)) { |
977 setCursor(Qt::SizeHorCursor); | 981 setCursor(Qt::SizeHorCursor); |
978 } else { | 982 } else { |
1008 | 1012 |
1009 dragTopLayer(e); | 1013 dragTopLayer(e); |
1010 } | 1014 } |
1011 | 1015 |
1012 } else if (mode == ViewManager::SelectMode) { | 1016 } else if (mode == ViewManager::SelectMode) { |
1017 | |
1018 if (!hasTopLayerTimeXAxis()) return; | |
1013 | 1019 |
1014 dragExtendSelection(e); | 1020 dragExtendSelection(e); |
1015 | 1021 |
1016 } else if (mode == ViewManager::DrawMode) { | 1022 } else if (mode == ViewManager::DrawMode) { |
1017 | 1023 |
1688 | 1694 |
1689 help = tr("Click and drag to navigate"); | 1695 help = tr("Click and drag to navigate"); |
1690 | 1696 |
1691 } else if (mode == ViewManager::SelectMode) { | 1697 } else if (mode == ViewManager::SelectMode) { |
1692 | 1698 |
1699 if (!hasTopLayerTimeXAxis()) return; | |
1700 | |
1693 bool haveSelection = (m_manager && !m_manager->getSelections().empty()); | 1701 bool haveSelection = (m_manager && !m_manager->getSelections().empty()); |
1694 | 1702 |
1695 if (haveSelection) { | 1703 if (haveSelection) { |
1696 if (editable) { | 1704 if (editable) { |
1697 help = tr("Click and drag to select a range; hold Shift to avoid snapping to items; hold Ctrl for multi-select; middle-click and drag to navigate"); | 1705 help = tr("Click and drag to select a range; hold Shift to avoid snapping to items; hold Ctrl for multi-select; middle-click and drag to navigate"); |