diff --git a/include/automatable_button.h b/include/automatable_button.h index 0ef28a112..3aabe36c0 100644 --- a/include/automatable_button.h +++ b/include/automatable_button.h @@ -1,7 +1,7 @@ /* * automatable_button.h - class automatableButton, the base for all buttons * - * Copyright (c) 2006-2007 Tobias Doerffel + * Copyright (c) 2006-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -47,6 +47,8 @@ public: model()->setJournalling( _on ); } + virtual void modelChanged( void ); + public slots: virtual void update( void ); diff --git a/src/widgets/automatable_button.cpp b/src/widgets/automatable_button.cpp index 646b5eef8..3651bcced 100644 --- a/src/widgets/automatable_button.cpp +++ b/src/widgets/automatable_button.cpp @@ -63,6 +63,17 @@ automatableButton::~automatableButton() +void automatableButton::modelChanged( void ) +{ + if( QPushButton::isChecked() != model()->value() ) + { + QPushButton::setChecked( model()->value() ); + } +} + + + + void automatableButton::update( void ) { if( QPushButton::isChecked() != model()->value() )