Mercurial > hg > svgui
diff layer/TimeInstantLayer.cpp @ 125:999ae0f7d10c
* Change preferences dialog to ok/apply/cancel model
* Make preferences persist in a config file
* Change instance() to getInstance() for all singleton types
* Make pasting to time-value layer with no values in clipboard ask you how to
generate the values
* Fix bad behaviour caused by importing "data"-type (i.e. 3d dense) model from
annotation file without a fixed window size available
author | Chris Cannam |
---|---|
date | Thu, 27 Jul 2006 16:06:32 +0000 |
parents | 453f7da3534e |
children | 33929e0c3c6b |
line wrap: on
line diff
--- a/layer/TimeInstantLayer.cpp Wed Jul 26 16:48:07 2006 +0000 +++ b/layer/TimeInstantLayer.cpp Thu Jul 27 16:06:32 2006 +0000 @@ -721,10 +721,10 @@ } } -void -TimeInstantLayer::paste(const Clipboard &from, int frameOffset) +bool +TimeInstantLayer::paste(const Clipboard &from, int frameOffset, bool interactive) { - if (!m_model) return; + if (!m_model) return false; const Clipboard::PointList &points = from.getPoints(); @@ -740,12 +740,17 @@ frame = i->getFrame() + frameOffset; } SparseOneDimensionalModel::Point newPoint(frame); - if (i->haveLabel()) newPoint.label = i->getLabel(); + if (i->haveLabel()) { + newPoint.label = i->getLabel(); + } else if (i->haveValue()) { + newPoint.label = QString("%1").arg(i->getValue()); + } command->addPoint(newPoint); } command->finish(); + return true; } QString