comparison view/Pane.cpp @ 204:942cfa1df966

* Fix occasional misplacement of zoom wheels * Disable tearoff in context menu (it always got activated when you just clicked and released)
author Chris Cannam
date Mon, 26 Feb 2007 14:18:21 +0000
parents fcc043f75c41
children 6969f21da18a
comparison
equal deleted inserted replaced
203:258af0c4dc28 204:942cfa1df966
200 if (count != 50 && m_hthumb->getDefaultValue() == 0) { 200 if (count != 50 && m_hthumb->getDefaultValue() == 0) {
201 m_hthumb->setDefaultValue(count - current); 201 m_hthumb->setDefaultValue(count - current);
202 // std::cerr << "set default value to " << m_hthumb->getDefaultValue() << std::endl; 202 // std::cerr << "set default value to " << m_hthumb->getDefaultValue() << std::endl;
203 } 203 }
204 204
205 bool haveVThumb = false;
206
205 if (layer) { 207 if (layer) {
206 int defaultStep = 0; 208 int defaultStep = 0;
207 int max = layer->getVerticalZoomSteps(defaultStep); 209 int max = layer->getVerticalZoomSteps(defaultStep);
208 if (max == 0) { 210 if (max == 0) {
209 m_vthumb->hide(); 211 m_vthumb->hide();
210 } else { 212 } else {
213 haveVThumb = true;
211 m_vthumb->show(); 214 m_vthumb->show();
212 m_vthumb->blockSignals(true); 215 m_vthumb->blockSignals(true);
213 m_vthumb->setMinimumValue(0); 216 m_vthumb->setMinimumValue(0);
214 m_vthumb->setMaximumValue(max); 217 m_vthumb->setMaximumValue(max);
215 m_vthumb->setDefaultValue(defaultStep); 218 m_vthumb->setDefaultValue(defaultStep);
230 if (!m_headsUpDisplay->isVisible()) { 233 if (!m_headsUpDisplay->isVisible()) {
231 m_headsUpDisplay->show(); 234 m_headsUpDisplay->show();
232 connect(m_manager, SIGNAL(zoomLevelChanged()), 235 connect(m_manager, SIGNAL(zoomLevelChanged()),
233 this, SLOT(zoomLevelChanged())); 236 this, SLOT(zoomLevelChanged()));
234 } 237 }
235 if (m_vthumb->isVisible()) { 238 if (haveVThumb) {
239 std::cerr << "vthumb is visible, moving to " << height() -86 << std::endl;
240 m_headsUpDisplay->setFixedHeight(m_vthumb->height() + m_hthumb->height());
236 m_headsUpDisplay->move(width() - 86, height() - 86); 241 m_headsUpDisplay->move(width() - 86, height() - 86);
237 } else { 242 } else {
238 m_headsUpDisplay->move(width() - 86, height() - 51); 243 std::cerr << "vthumb is invisible, moving to " << height() -51 << std::endl;
244 m_headsUpDisplay->setFixedHeight(m_hthumb->height());
245 m_headsUpDisplay->move(width() - 86, height() - 16);
239 } 246 }
240 } else { 247 } else {
241 m_headsUpDisplay->hide(); 248 m_headsUpDisplay->hide();
242 if (m_manager) { 249 if (m_manager) {
243 disconnect(m_manager, SIGNAL(zoomLevelChanged()), 250 disconnect(m_manager, SIGNAL(zoomLevelChanged()),