# HG changeset patch # User Chris Cannam # Date 1235496355 0 # Node ID 64b09e5bda2109519a30de25e0d96ba289b14f90 # Parent 06fc6fc21739b128a4cc50fcad64b509e8272f13 * rtmidi & activity updates diff -r 06fc6fc21739 -r 64b09e5bda21 framework/Document.cpp --- a/framework/Document.cpp Tue Feb 24 16:44:43 2009 +0000 +++ b/framework/Document.cpp Tue Feb 24 17:25:55 2009 +0000 @@ -263,8 +263,13 @@ { Model *oldMainModel = m_mainModel; m_mainModel = model; - + emit modelAdded(m_mainModel); + if (model) { + emit activity(tr("Set main model to %1").arg(model->objectName())); + } else { + emit activity(tr("Clear main model")); + } std::vector obsoleteLayers; std::set failedTransformers; diff -r 06fc6fc21739 -r 64b09e5bda21 framework/Document.h --- a/framework/Document.h Tue Feb 24 16:44:43 2009 +0000 +++ b/framework/Document.h Tue Feb 24 17:25:55 2009 +0000 @@ -236,6 +236,8 @@ QString message); void alignmentFailed(QString transformName, QString message); + void activity(QString); + protected: void releaseModel(Model *model); diff -r 06fc6fc21739 -r 64b09e5bda21 framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Tue Feb 24 16:44:43 2009 +0000 +++ b/framework/MainWindowBase.cpp Tue Feb 24 17:25:55 2009 +0000 @@ -713,8 +713,11 @@ void MainWindowBase::insertInstant() { - int frame = m_viewManager->getPlaybackFrame(); - insertInstantAt(frame); + if (m_playSource && m_playSource->isPlaying()) { + insertInstantAt(m_playSource->getCurrentPlayingFrame()); + } else { + insertInstantAt(m_viewManager->getPlaybackFrame()); + } } void @@ -1714,6 +1717,8 @@ this, SLOT(modelRegenerationWarning(QString, QString, QString))); connect(m_document, SIGNAL(alignmentFailed(QString, QString)), this, SLOT(alignmentFailed(QString, QString))); + + emit replacedDocument(); } bool diff -r 06fc6fc21739 -r 64b09e5bda21 framework/MainWindowBase.h --- a/framework/MainWindowBase.h Tue Feb 24 16:44:43 2009 +0000 +++ b/framework/MainWindowBase.h Tue Feb 24 17:25:55 2009 +0000 @@ -142,6 +142,7 @@ void canSelectNextLayer(bool); void canSave(bool); void hideSplash(); + void replacedDocument(); public slots: virtual void preferenceChanged(PropertyContainer::PropertyName);