Mercurial > hg > svgui
comparison view/View.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 | 34bbbcb3c01f |
children | cd81066ac7ad |
comparison
equal
deleted
inserted
replaced
216:34bbbcb3c01f | 217:bd2d0346da0e |
---|---|
1067 for (LayerList::const_iterator i = m_layers.begin(); i != m_layers.end(); ++i) { | 1067 for (LayerList::const_iterator i = m_layers.begin(); i != m_layers.end(); ++i) { |
1068 if ((*i)->isLayerColourSignificant()) return true; | 1068 if ((*i)->isLayerColourSignificant()) return true; |
1069 if ((*i)->isLayerOpaque()) break; | 1069 if ((*i)->isLayerOpaque()) break; |
1070 } | 1070 } |
1071 return false; | 1071 return false; |
1072 } | |
1073 | |
1074 bool | |
1075 View::hasTopLayerTimeXAxis() const | |
1076 { | |
1077 LayerList::const_iterator i = m_layers.end(); | |
1078 if (i == m_layers.begin()) return false; | |
1079 --i; | |
1080 return (*i)->hasTimeXAxis(); | |
1072 } | 1081 } |
1073 | 1082 |
1074 void | 1083 void |
1075 View::zoom(bool in) | 1084 View::zoom(bool in) |
1076 { | 1085 { |
1433 } | 1442 } |
1434 | 1443 |
1435 void | 1444 void |
1436 View::drawSelections(QPainter &paint) | 1445 View::drawSelections(QPainter &paint) |
1437 { | 1446 { |
1447 if (!hasTopLayerTimeXAxis()) return; | |
1448 | |
1438 MultiSelection::SelectionList selections; | 1449 MultiSelection::SelectionList selections; |
1439 | 1450 |
1440 if (m_manager) { | 1451 if (m_manager) { |
1441 selections = m_manager->getSelections(); | 1452 selections = m_manager->getSelections(); |
1442 if (m_manager->haveInProgressSelection()) { | 1453 if (m_manager->haveInProgressSelection()) { |