comparison view/PaneStack.cpp @ 855:57efeb75880d

Simplify some logic where loop was used with an unconditional "break" that meant it could only happen once (from coverity scan)
author Chris Cannam
date Wed, 03 Sep 2014 12:05:45 +0100
parents 4c8ca536b54f
children 99373ca20caf 4a578a360011
comparison
equal deleted inserted replaced
854:c17719e488c9 855:57efeb75880d
97 currentIndicator->setMinimumWidth(8); 97 currentIndicator->setMinimumWidth(8);
98 currentIndicator->setScaledContents(true); 98 currentIndicator->setScaledContents(true);
99 currentIndicator->setVisible(m_showAccessories); 99 currentIndicator->setVisible(m_showAccessories);
100 100
101 int initialCentreFrame = -1; 101 int initialCentreFrame = -1;
102 for (int i = 0; i < (int)m_panes.size(); ++i) { 102 if (!m_panes.empty()) {
103 int f = m_panes[i].pane->getCentreFrame(); 103 initialCentreFrame = m_panes[0].pane->getCentreFrame();
104 initialCentreFrame = f;
105 break;
106 } 104 }
107 105
108 Pane *pane = new Pane(frame); 106 Pane *pane = new Pane(frame);
109 if (initialCentreFrame >= 0) { 107 if (initialCentreFrame >= 0) {
110 pane->setViewManager(m_viewManager, initialCentreFrame); 108 pane->setViewManager(m_viewManager, initialCentreFrame);