Mercurial > hg > svgui
comparison view/Overview.cpp @ 222:cd81066ac7ad
* More useful status bar text -- show the current play time and the extents of
the visible area
* Add update-i18n.sh to update the i18n/ts and qm files -- I can't get qmake
to do the right thing now that the project file has been split up into
several project files
* Fix missing Q_OBJECTs, etc, reported by lupdate
* Update Russian translation from AlexandrE
author | Chris Cannam |
---|---|
date | Wed, 07 Mar 2007 17:07:02 +0000 |
parents | 8520b7918104 |
children | 28c8e8e3c537 |
comparison
equal
deleted
inserted
replaced
221:9e739f92c0b8 | 222:cd81066ac7ad |
---|---|
74 update(); | 74 update(); |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
78 void | 78 void |
79 Overview::viewManagerZoomLevelChanged(void *p, unsigned long z, bool) | 79 Overview::viewZoomLevelChanged(View *v, unsigned long z, bool) |
80 { | 80 { |
81 if (p == this) return; | 81 if (v == this) return; |
82 View *v = (View *)p; | |
83 if (m_views.find(v) != m_views.end()) { | 82 if (m_views.find(v) != m_views.end()) { |
84 update(); | 83 update(); |
85 } | 84 } |
86 } | 85 } |
87 | 86 |
109 if (zoomLevel < 1) zoomLevel = 1; | 108 if (zoomLevel < 1) zoomLevel = 1; |
110 zoomLevel = getZoomConstraintBlockSize(zoomLevel, | 109 zoomLevel = getZoomConstraintBlockSize(zoomLevel, |
111 ZoomConstraint::RoundUp); | 110 ZoomConstraint::RoundUp); |
112 if (zoomLevel != m_zoomLevel) { | 111 if (zoomLevel != m_zoomLevel) { |
113 m_zoomLevel = zoomLevel; | 112 m_zoomLevel = zoomLevel; |
114 emit zoomLevelChanged(this, m_zoomLevel, m_followZoom); | 113 emit zoomLevelChanged(m_zoomLevel, m_followZoom); |
115 } | 114 } |
116 size_t centreFrame = startFrame + m_zoomLevel * (width() / 2); | 115 size_t centreFrame = startFrame + m_zoomLevel * (width() / 2); |
117 if (centreFrame > (startFrame + getModelsEndFrame())/2) { | 116 if (centreFrame > (startFrame + getModelsEndFrame())/2) { |
118 centreFrame = (startFrame + getModelsEndFrame())/2; | 117 centreFrame = (startFrame + getModelsEndFrame())/2; |
119 } | 118 } |