comparison widgets/PropertyBox.cpp @ 55:128ebfeeebee

* Add Insert Instant function in main window * Ensure selections and window geometry are saved in session file * Add wait cursor on session file save * Various improvements to display of texts in pane (clearer readability) * Use commands for setting properties on layers and panes (still need to batch up multiple sets on the same property) * Fix failure of spectrogram to refresh when initial part became visible * Some fixes & paint optimisations in View &c * Make curve mode for time value layers work properly when resolution == 1 * Some vague improvements for time value layer vertical scale
author Chris Cannam
date Thu, 16 Mar 2006 18:46:00 +0000
parents 2e2ad8510e52
children 2b87a7bd9256
comparison
equal deleted inserted replaced
54:8dae7f6732c1 55:128ebfeeebee
262 m_layout->addWidget(cb, row, 1, 1, 2); 262 m_layout->addWidget(cb, row, 1, 1, 2);
263 } 263 }
264 m_propertyControllers[name] = cb; 264 m_propertyControllers[name] = cb;
265 } 265 }
266 266
267 if (cb->isChecked() != (value > 0)) cb->setChecked(value > 0); 267 if (cb->isChecked() != (value > 0)) {
268 cb->blockSignals(true);
269 cb->setChecked(value > 0);
270 cb->blockSignals(false);
271 }
268 break; 272 break;
269 } 273 }
270 274
271 case PropertyContainer::RangeProperty: 275 case PropertyContainer::RangeProperty:
272 { 276 {
306 } 310 }
307 311
308 m_propertyControllers[name] = dial; 312 m_propertyControllers[name] = dial;
309 } 313 }
310 314
311 if (dial->value() != value) dial->setValue(value); 315 if (dial->value() != value) {
316 dial->blockSignals(true);
317 dial->setValue(value);
318 dial->blockSignals(false);
319 }
312 break; 320 break;
313 } 321 }
314 322
315 case PropertyContainer::ValueProperty: 323 case PropertyContainer::ValueProperty:
316 { 324 {
338 m_layout->addWidget(cb, row, 1, 1, 2); 346 m_layout->addWidget(cb, row, 1, 1, 2);
339 } 347 }
340 m_propertyControllers[name] = cb; 348 m_propertyControllers[name] = cb;
341 } 349 }
342 350
343 if (cb->currentIndex() != value) cb->setCurrentIndex(value); 351 if (cb->currentIndex() != value) {
352 cb->blockSignals(true);
353 cb->setCurrentIndex(value);
354 cb->blockSignals(false);
355 }
344 356
345 #ifdef Q_WS_MAC 357 #ifdef Q_WS_MAC
346 // Crashes on startup without this, for some reason 358 // Crashes on startup without this, for some reason
347 cb->setMinimumSize(QSize(10, 10)); 359 cb->setMinimumSize(QSize(10, 10));
348 #endif 360 #endif
358 void 370 void
359 PropertyBox::propertyContainerPropertyChanged(PropertyContainer *pc) 371 PropertyBox::propertyContainerPropertyChanged(PropertyContainer *pc)
360 { 372 {
361 if (pc != m_container) return; 373 if (pc != m_container) return;
362 374
375 #ifdef DEBUG_PROPERTY_BOX
376 std::cerr << "PropertyBox::propertyContainerPropertyChanged" << std::endl;
377 #endif
378
363 PropertyContainer::PropertyList properties = m_container->getProperties(); 379 PropertyContainer::PropertyList properties = m_container->getProperties();
364 size_t i; 380 size_t i;
365 381
366 blockSignals(true); 382 blockSignals(true);
367 383
384 #endif 400 #endif
385 401
386 PropertyContainer::PropertyType type = m_container->getPropertyType(name); 402 PropertyContainer::PropertyType type = m_container->getPropertyType(name);
387 403
388 if (type != PropertyContainer::InvalidProperty) { 404 if (type != PropertyContainer::InvalidProperty) {
389 m_container->setProperty(name, value); 405 m_container->setPropertyWithCommand(name, value);
390 } 406 }
391 407
392 if (type == PropertyContainer::RangeProperty) { 408 if (type == PropertyContainer::RangeProperty) {
393 AudioDial *dial = dynamic_cast<AudioDial *>(m_propertyControllers[name]); 409 AudioDial *dial = dynamic_cast<AudioDial *>(m_propertyControllers[name]);
394 if (dial) { 410 if (dial) {