From ecd46173b7f5bd27daa361598a0941b90774a6e7 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 8 Mar 2008 20:18:25 +0000 Subject: [PATCH] made "Send to active instrument-track" work again git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@779 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/file_browser.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/file_browser.cpp b/src/core/file_browser.cpp index 0f413daa3..8fcd7b644 100644 --- a/src/core/file_browser.cpp +++ b/src/core/file_browser.cpp @@ -4,7 +4,7 @@ * file_browser.cpp - implementation of the project-, preset- and * sample-file-browser * - * Copyright (c) 2004-2007 Tobias Doerffel + * Copyright (c) 2004-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -318,24 +318,25 @@ void listView::sendToActiveInstrumentTrack( void ) } // get all windows opened in the workspace - QList pl = engine::getMainWindow()->workspace()->subWindowList( - QMdiArea::StackingOrder ); + QList pl = engine::getMainWindow()->workspace()-> + subWindowList( QMdiArea::StackingOrder ); QListIterator w( pl ); w.toBack(); // now we travel through the window-list until we find an // instrument-track while( w.hasPrevious() ) { - instrumentTrackView * itv = dynamic_cast( - w.previous()->widget() ); - if( itv != NULL && itv->isHidden() == FALSE ) + instrumentTrackWindow * itw = + dynamic_cast( w.previous()-> + widget() ); + if( itw != NULL && itw->isHidden() == FALSE ) { // ok, it's an instrument-track, so we can apply the // sample or the preset engine::getMixer()->lock(); if( m_contextMenuItem->type() == fileItem::SampleFile ) { - instrument * afp = itv->model()->loadInstrument( + instrument * afp = itw->model()->loadInstrument( engine::sampleExtensions() [m_contextMenuItem ->extension()] ); @@ -350,11 +351,10 @@ void listView::sendToActiveInstrumentTrack( void ) { multimediaProject mmp( m_contextMenuItem->fullName() ); - itv->model()->loadTrackSpecificSettings( + itw->model()->loadTrackSpecificSettings( mmp.content().firstChild(). toElement() ); } - //ct->toggledInstrumentTrackButton( TRUE ); engine::getMixer()->unlock(); break; }