Merge pull request #1026 from LMMS/stable-1.1

sync
This commit is contained in:
Vesa V
2014-07-26 00:31:03 +03:00
722 changed files with 149696 additions and 16 deletions

View File

@@ -159,6 +159,7 @@ void configManager::addRecentlyOpenedProject( const QString & _file )
m_recentlyOpenedProjects.removeLast();
}
m_recentlyOpenedProjects.push_front( _file );
configManager::inst()->saveConfigFile();
}

View File

@@ -1703,6 +1703,14 @@ void trackOperationsWidget::cloneTrack()
}
/*! \brief Clear this track - clears all TCOs from the track */
void trackOperationsWidget::clearTrack()
{
engine::mixer()->lock();
m_trackView->getTrack()->deleteTCOs();
engine::mixer()->unlock();
}
/*! \brief Remove this track from the track list
@@ -1734,6 +1742,11 @@ void trackOperationsWidget::updateMenu()
to_menu->addAction( embed::getIconPixmap( "cancel", 16, 16 ),
tr( "Remove this track" ),
this, SLOT( removeTrack() ) );
if( ! m_trackView->trackContainerView()->fixedTCOs() )
{
to_menu->addAction( tr( "Clear this track" ), this, SLOT( clearTrack() ) );
}
if( dynamic_cast<InstrumentTrackView *>( m_trackView ) )
{
@@ -2071,6 +2084,14 @@ void track::removeTCO( trackContentObject * _tco )
}
/*! \brief Remove all TCOs from this track */
void track::deleteTCOs()
{
while( ! m_trackContentObjects.isEmpty() )
{
delete m_trackContentObjects.first();
}
}
/*! \brief Return the number of trackContentObjects we contain

View File

@@ -35,6 +35,8 @@
#include "song.h"
#include "tool_button.h"
#include "config_mgr.h"
#include "DataFile.h"
#include "string_pair_drag.h"
#include "TrackContainer.h"
#include "pattern.h"
@@ -157,6 +159,26 @@ bbEditor::~bbEditor()
}
void bbEditor::dropEvent( QDropEvent * de )
{
QString type = stringPairDrag::decodeKey( de );
QString value = stringPairDrag::decodeValue( de );
if( type.left( 6 ) == "track_" )
{
DataFile dataFile( value.toUtf8() );
track * t = track::create( dataFile.content().firstChild().toElement(), model() );
t->deleteTCOs();
m_bbtc->updateAfterTrackAdd();
de->accept();
}
else
{
TrackContainerView::dropEvent( de );
}
}
void bbEditor::removeBBView( int _bb )

View File

@@ -477,7 +477,7 @@ void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc,
engine::getBBEditor()->currentBB() );*/
if( s_infoMap[this] == 0 &&
_this.parentNode().parentNode().nodeName() != "clone" &&
_this.parentNode().nodeName() != "journaldata" )
_this.parentNode().parentNode().nodeName() != "journaldata" )
{
( (JournallingObject *)( engine::getBBTrackContainer() ) )->
saveState( _doc, _this );