From 782156cf706527b88d0aafbb294cbaebec1d7fe3 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 12 Mar 2009 01:00:36 +0100 Subject: [PATCH] MidiPort: properly emit portChanged signals when loading settings - fixes MidiPortMenu showing devices not checked although actually connected --- src/core/midi/midi_port.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/midi/midi_port.cpp b/src/core/midi/midi_port.cpp index 44896e798..d8035f77e 100644 --- a/src/core/midi/midi_port.cpp +++ b/src/core/midi/midi_port.cpp @@ -2,7 +2,7 @@ * midi_port.cpp - abstraction of MIDI-ports which are part of LMMS's MIDI- * sequencing system * - * Copyright (c) 2005-2008 Tobias Doerffel + * Copyright (c) 2005-2009 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -52,7 +52,7 @@ midiPort::midiPort( const QString & _name, midiClient * _mc, m_fixedInputVelocityModel( -1, -1, MidiMaxVelocity, this, tr( "Fixed input velocity" ) ), m_fixedOutputVelocityModel( -1, -1, MidiMaxVelocity, this, - tr( "Fixed output velocity" ) ), + tr( "Fixed output velocity" ) ), m_outputProgramModel( 1, 1, MidiProgramCount, this, tr( "Output MIDI program" ) ), m_readableModel( false, this, tr( "Receive MIDI-events" ) ), @@ -255,6 +255,7 @@ void midiPort::loadSettings( const QDomElement & _this ) subscribeReadablePort( it.key() ); } } + emit readablePortsChanged(); } if( outputEnabled() ) @@ -268,6 +269,7 @@ void midiPort::loadSettings( const QDomElement & _this ) subscribeReadablePort( it.key() ); } } + emit writeablePortsChanged(); } }