comparison framework/MainWindowBase.cpp @ 108:e25e8f5d785b

* Fix #1628781 changes to layer visibility and mute should use a command * Also use a command for changes to layer playback pan, gain, plugin settings * Refactor PlayParameterRepository to remove dependency on audioio from base * Fix failure to save play parameters for main model in session file
author Chris Cannam
date Thu, 13 Mar 2008 14:06:03 +0000
parents 907e44e4ecf0
children 2dd30a7cd21a
comparison
equal deleted inserted replaced
107:52af71802ffd 108:e25e8f5d785b
778 .arg(RealTime::frame2RealTime 778 .arg(RealTime::frame2RealTime
779 (frame, 779 (frame,
780 sodm->getSampleRate()) 780 sodm->getSampleRate())
781 .toText(false).c_str())); 781 .toText(false).c_str()));
782 782
783 command->finish(); 783 Command *c = command->finish();
784 if (c) CommandHistory::getInstance()->addCommand(c, false);
784 } 785 }
785 } 786 }
786 } 787 }
787 788
788 void 789 void
929 if (mode == ReplaceMainModel) { 930 if (mode == ReplaceMainModel) {
930 931
931 Model *prevMain = getMainModel(); 932 Model *prevMain = getMainModel();
932 if (prevMain) { 933 if (prevMain) {
933 m_playSource->removeModel(prevMain); 934 m_playSource->removeModel(prevMain);
934 PlayParameterRepository::getInstance()->removeModel(prevMain); 935 PlayParameterRepository::getInstance()->removePlayable(prevMain);
935 } 936 }
936 PlayParameterRepository::getInstance()->addModel(newModel); 937 PlayParameterRepository::getInstance()->addPlayable(newModel);
937 938
938 m_document->setMainModel(newModel); 939 m_document->setMainModel(newModel);
939 940
940 setupMenus(); 941 setupMenus();
941 942