comparison widgets/PluginParameterDialog.cpp @ 296:ea37c229a578

* Fix #1757772 tempo, dynamic related plug-ins bug -- make auto-align only auto-align if there is a unit involved * Fix #1755366 text layer bug in retrieved session * Fix input model selection in plugin parameter dialog (was being ignored) * Use lighter background than the standard widget one for panes (assuming the widget background is light but not white) -- similarly darker if dark * Fix colour reference counting in loaded session in SingleColourLayer * Reset overview pane colour when switching dark background on or off
author Chris Cannam
date Tue, 14 Aug 2007 13:58:53 +0000
parents 919740b20cc9
children e9549ea3f825
comparison
equal deleted inserted replaced
295:5804703450d8 296:ea37c229a578
437 QString lastModel = settings.value("lastinputmodel").toString(); 437 QString lastModel = settings.value("lastinputmodel").toString();
438 settings.endGroup(); 438 settings.endGroup();
439 439
440 m_inputModelList = models; 440 m_inputModelList = models;
441 m_inputModels->addItems(TextAbbrev::abbreviate(models, 80)); 441 m_inputModels->addItems(TextAbbrev::abbreviate(models, 80));
442 m_inputModels->setCurrentIndex(0);
442 443
443 if (lastModel != "") { 444 if (lastModel != "") {
444 for (int i = 0; i < models.size(); ++i) { 445 for (int i = 0; i < models.size(); ++i) {
445 if (lastModel == models[i]) { 446 if (lastModel == models[i]) {
446 m_inputModels->setCurrentIndex(i); 447 m_inputModels->setCurrentIndex(i);
448 m_currentInputModel = models[i];
447 break; 449 break;
448 } 450 }
449 } 451 }
450 } 452 }
451 453
455 } 457 }
456 458
457 QString 459 QString
458 PluginParameterDialog::getInputModel() const 460 PluginParameterDialog::getInputModel() const
459 { 461 {
460 if (!m_inputModels || !m_inputModels->isVisible()) return ""; 462 return m_currentInputModel;
461 int i = m_inputModels->currentIndex();
462 if (i >= m_inputModelList.size()) return "";
463 return m_inputModelList[i];
464 } 463 }
465 464
466 void 465 void
467 PluginParameterDialog::getProcessingParameters(size_t &blockSize) const 466 PluginParameterDialog::getProcessingParameters(size_t &blockSize) const
468 { 467 {
545 544
546 void 545 void
547 PluginParameterDialog::inputModelComboChanged(int index) 546 PluginParameterDialog::inputModelComboChanged(int index)
548 { 547 {
549 if (index >= m_inputModelList.size()) return; 548 if (index >= m_inputModelList.size()) return;
550 emit inputModelChanged(m_inputModelList[index]); 549 m_currentInputModel = m_inputModelList[index];
550 emit inputModelChanged(m_currentInputModel);
551 } 551 }
552 552
553 void 553 void
554 PluginParameterDialog::dialogAccepted() 554 PluginParameterDialog::dialogAccepted()
555 { 555 {