From 54ce5b96f64856a81896e7ce4f4b5d8cf7464c41 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 16 Aug 2010 20:23:08 +0200 Subject: [PATCH] MeterModel: clear global automation patterns in reset() When resetting a MeterModel we also have to clear global automation patterns attached to it. Fixes bug with persistent automation data on e.g. time signature widget when clearing project. (cherry picked from commit 23a3efcac0740fba7dcfb2d247cf79422b4a2dc5) --- src/core/MeterModel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/MeterModel.cpp b/src/core/MeterModel.cpp index 06d3c8046..f4d97d733 100644 --- a/src/core/MeterModel.cpp +++ b/src/core/MeterModel.cpp @@ -1,7 +1,7 @@ /* * MeterModel.cpp - model for meter specification * - * Copyright (c) 2008-2009 Tobias Doerffel + * Copyright (c) 2008-2010 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -24,6 +24,7 @@ #include "MeterModel.h" +#include "AutomationPattern.h" MeterModel::MeterModel( ::Model * _parent ) : @@ -51,6 +52,9 @@ void MeterModel::reset() { m_numeratorModel.setValue( 4 ); m_denominatorModel.setValue( 4 ); + + AutomationPattern::globalAutomationPattern( &m_numeratorModel )->clear(); + AutomationPattern::globalAutomationPattern( &m_denominatorModel )->clear(); }