Merge branch 'stable-1.2'
# Conflicts:
# .travis/osx..install.sh
# .travis/osx..script.sh
# cmake/linux/package_linux.sh.in
# data/locale/en.ts
# src/core/CMakeLists.txt
# src/core/ProjectRenderer.cpp
# src/gui/FileBrowser.cpp
This commit is contained in:
@@ -114,7 +114,7 @@ IF(LMMS_BUILD_WIN32)
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET(EXTRA_LIBRARIES "-framework CoreMIDI")
|
||||
SET(EXTRA_LIBRARIES "-framework CoreMIDI -framework CoreFoundation")
|
||||
ENDIF()
|
||||
|
||||
if(LMMS_HAVE_OSS AND LMMS_BUILD_OPENBSD)
|
||||
|
||||
@@ -189,7 +189,7 @@ MidiTime AutomationPattern::timeMapLength() const
|
||||
{
|
||||
if( m_timeMap.isEmpty() ) return 0;
|
||||
timeMap::const_iterator it = m_timeMap.end();
|
||||
return MidiTime( qMax( MidiTime( (it-1).key() ).getTact() + 1, 1 ), 0 );
|
||||
return MidiTime( MidiTime( (it-1).key() ).nextFullTact(), 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -225,9 +225,9 @@ bool ConfigManager::hasWorkingDir() const
|
||||
}
|
||||
|
||||
|
||||
void ConfigManager::setWorkingDir( const QString & _wd )
|
||||
void ConfigManager::setWorkingDir( const QString & wd )
|
||||
{
|
||||
m_workingDir = ensureTrailingSlash( _wd );
|
||||
m_workingDir = ensureTrailingSlash( QFileInfo( wd ).canonicalFilePath() );
|
||||
}
|
||||
|
||||
|
||||
@@ -553,6 +553,8 @@ void ConfigManager::loadConfigFile( const QString & configFile )
|
||||
}
|
||||
#endif
|
||||
|
||||
upgrade();
|
||||
|
||||
QStringList searchPaths;
|
||||
if(! qgetenv("LMMS_THEME_PATH").isNull())
|
||||
searchPaths << qgetenv("LMMS_THEME_PATH");
|
||||
@@ -564,8 +566,6 @@ void ConfigManager::loadConfigFile( const QString & configFile )
|
||||
{
|
||||
createWorkingDir();
|
||||
}
|
||||
|
||||
upgrade();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -579,8 +579,6 @@ void Mixer::setAudioDevice( AudioDevice * _dev )
|
||||
{
|
||||
stopProcessing();
|
||||
|
||||
m_oldAudioDev = m_audioDev;
|
||||
|
||||
if( _dev == NULL )
|
||||
{
|
||||
printf( "param _dev == NULL in Mixer::setAudioDevice(...). "
|
||||
@@ -608,7 +606,6 @@ void Mixer::setAudioDevice( AudioDevice * _dev,
|
||||
stopProcessing();
|
||||
|
||||
m_qualitySettings = _qs;
|
||||
m_oldAudioDev = m_audioDev;
|
||||
|
||||
if( _dev == NULL )
|
||||
{
|
||||
@@ -630,6 +627,17 @@ void Mixer::setAudioDevice( AudioDevice * _dev,
|
||||
|
||||
|
||||
|
||||
void Mixer::storeAudioDevice()
|
||||
{
|
||||
if( !m_oldAudioDev )
|
||||
{
|
||||
m_oldAudioDev = m_audioDev;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Mixer::restoreAudioDevice()
|
||||
{
|
||||
if( m_oldAudioDev != NULL )
|
||||
|
||||
@@ -83,7 +83,6 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & qualitySettings
|
||||
QThread( Engine::mixer() ),
|
||||
m_fileDev( NULL ),
|
||||
m_qualitySettings( qualitySettings ),
|
||||
m_oldQualitySettings( Engine::mixer()->currentQualitySettings() ),
|
||||
m_progress( 0 ),
|
||||
m_abort( false )
|
||||
{
|
||||
@@ -109,8 +108,6 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & qualitySettings
|
||||
|
||||
ProjectRenderer::~ProjectRenderer()
|
||||
{
|
||||
Engine::mixer()->restoreAudioDevice(); // Also deletes audio dev.
|
||||
Engine::mixer()->changeQuality( m_oldQualitySettings );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,21 +37,29 @@ RenderManager::RenderManager(
|
||||
ProjectRenderer::ExportFileFormats fmt,
|
||||
QString outputPath) :
|
||||
m_qualitySettings(qualitySettings),
|
||||
m_oldQualitySettings( Engine::mixer()->currentQualitySettings() ),
|
||||
m_outputSettings(outputSettings),
|
||||
m_format(fmt),
|
||||
m_outputPath(outputPath),
|
||||
m_activeRenderer(NULL)
|
||||
{
|
||||
Engine::mixer()->storeAudioDevice();
|
||||
}
|
||||
|
||||
RenderManager::~RenderManager()
|
||||
{
|
||||
delete m_activeRenderer;
|
||||
m_activeRenderer = NULL;
|
||||
|
||||
Engine::mixer()->restoreAudioDevice(); // Also deletes audio dev.
|
||||
Engine::mixer()->changeQuality( m_oldQualitySettings );
|
||||
}
|
||||
|
||||
void RenderManager::abortProcessing()
|
||||
{
|
||||
if ( m_activeRenderer ) {
|
||||
disconnect( m_activeRenderer, SIGNAL( finished() ),
|
||||
this, SLOT( renderNextTrack() ) );
|
||||
m_activeRenderer->abortProcessing();
|
||||
}
|
||||
restoreMutedState();
|
||||
|
||||
@@ -1415,7 +1415,8 @@ QString SampleBuffer::tryToMakeRelative( const QString & file )
|
||||
{
|
||||
if( QFileInfo( file ).isRelative() == false )
|
||||
{
|
||||
QString f = QString( file ).replace( QDir::separator(), '/' );
|
||||
// Normalize the path
|
||||
QString f = QFileInfo( file ).canonicalFilePath().replace( QDir::separator(), '/' );
|
||||
|
||||
// First, look in factory samples
|
||||
// Isolate "samples/" from "data:/samples/"
|
||||
|
||||
@@ -119,6 +119,8 @@ void ExportProjectDialog::accept()
|
||||
{
|
||||
m_renderManager.reset(nullptr);
|
||||
QDialog::accept();
|
||||
|
||||
gui->mainWindow()->resetWindowTitle();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -427,7 +427,7 @@ void FileBrowserTreeWidget::mousePressEvent(QMouseEvent * me )
|
||||
m_previewPlayHandle = s;
|
||||
delete tf;
|
||||
}
|
||||
else if( ( f->extension ()== "xiz" || f->extension() == "sf2" || f->extension() == "sf3" || f->extension() == "gig" ) &&
|
||||
else if( ( f->extension ()== "xiz" || f->extension() == "sf2" || f->extension() == "sf3" || f->extension() == "gig" || f->extension() == "pat" ) &&
|
||||
! pluginFactory->pluginSupportingExtension(f->extension()).isNull() )
|
||||
{
|
||||
m_previewPlayHandle = new PresetPreviewPlayHandle( f->fullName(), f->handling() == FileItem::LoadByPlugin );
|
||||
@@ -492,6 +492,10 @@ void FileBrowserTreeWidget::mouseMoveEvent( QMouseEvent * me )
|
||||
new StringPairDrag( "soundfontfile", f->fullName(),
|
||||
embed::getIconPixmap( "soundfont_file" ), this );
|
||||
break;
|
||||
case FileItem::PatchFile:
|
||||
new StringPairDrag( "patchfile", f->fullName(),
|
||||
embed::getIconPixmap( "sample_file" ), this );
|
||||
break;
|
||||
case FileItem::VstPluginFile:
|
||||
new StringPairDrag( "vstpluginfile", f->fullName(),
|
||||
embed::getIconPixmap( "vst_plugin_file" ), this );
|
||||
|
||||
@@ -340,7 +340,7 @@ void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
StringPairDrag::processDragEnterEvent( _dee,
|
||||
QString( "presetfile,pluginpresetfile,samplefile,instrument,"
|
||||
"importedproject,soundfontfile,vstpluginfile,projectfile,"
|
||||
"importedproject,soundfontfile,patchfile,vstpluginfile,projectfile,"
|
||||
"track_%1,track_%2" ).
|
||||
arg( Track::InstrumentTrack ).
|
||||
arg( Track::SampleTrack ) );
|
||||
@@ -378,7 +378,8 @@ void TrackContainerView::dropEvent( QDropEvent * _de )
|
||||
_de->accept();
|
||||
}
|
||||
else if( type == "samplefile" || type == "pluginpresetfile"
|
||||
|| type == "soundfontfile" || type == "vstpluginfile")
|
||||
|| type == "soundfontfile" || type == "vstpluginfile"
|
||||
|| type == "patchfile" )
|
||||
{
|
||||
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
|
||||
Track::create( Track::InstrumentTrack,
|
||||
|
||||
@@ -2058,7 +2058,8 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me )
|
||||
pauseTestNotes( false );
|
||||
}
|
||||
}
|
||||
else if( ( edit_note || m_action == ActionChangeNoteProperty ) &&
|
||||
else if( m_editMode != ModeErase &&
|
||||
( edit_note || m_action == ActionChangeNoteProperty ) &&
|
||||
( me->buttons() & Qt::LeftButton || me->buttons() & Qt::MiddleButton
|
||||
|| ( me->buttons() & Qt::RightButton && me->modifiers() & Qt::ShiftModifier ) ) )
|
||||
{
|
||||
@@ -2120,9 +2121,14 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me )
|
||||
bool isUnderPosition = n->withinRange( ticks_start, ticks_end );
|
||||
// Play note under the cursor
|
||||
if ( isUnderPosition ) { testPlayNote( n ); }
|
||||
// If note is the one under the cursor or is selected when alt is
|
||||
// not pressed
|
||||
if ( ( isUnderPosition && !isSelection() ) || ( n->selected() && !altPressed ) )
|
||||
// If note is:
|
||||
// Under the cursor, when there is no selection
|
||||
// Selected, and alt is not pressed
|
||||
// Under the cursor, selected, and alt is pressed
|
||||
if ( ( isUnderPosition && !isSelection() ) ||
|
||||
( n->selected() && !altPressed ) ||
|
||||
( isUnderPosition && n->selected() && altPressed )
|
||||
)
|
||||
{
|
||||
if( m_noteEditMode == NoteEditVolume )
|
||||
{
|
||||
@@ -2248,9 +2254,11 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me )
|
||||
--m_selectedKeys;
|
||||
}
|
||||
}
|
||||
else if( m_editMode == ModeDraw && me->buttons() & Qt::RightButton )
|
||||
else if( ( m_editMode == ModeDraw && me->buttons() & Qt::RightButton )
|
||||
|| ( m_editMode == ModeErase && me->buttons() ) )
|
||||
{
|
||||
// holding down right-click to delete notes
|
||||
// holding down right-click to delete notes or holding down
|
||||
// any key if in erase mode
|
||||
|
||||
// get tick in which the user clicked
|
||||
int pos_ticks = x * MidiTime::ticksPerTact() / m_ppt +
|
||||
@@ -3403,6 +3411,7 @@ void PianoRoll::record()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pattern->addJournalCheckPoint();
|
||||
m_recording = true;
|
||||
|
||||
Engine::getSong()->playPattern( m_pattern, false );
|
||||
@@ -3422,6 +3431,7 @@ void PianoRoll::recordAccompany()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pattern->addJournalCheckPoint();
|
||||
m_recording = true;
|
||||
|
||||
if( m_pattern->getTrack()->trackContainer() == Engine::getSong() )
|
||||
@@ -3756,7 +3766,7 @@ void PianoRoll::pasteNotes()
|
||||
// create the note
|
||||
Note cur_note;
|
||||
cur_note.restoreState( list.item( i ).toElement() );
|
||||
cur_note.setPos( cur_note.pos() + m_timeLine->pos() );
|
||||
cur_note.setPos( cur_note.pos() + Note::quantized( m_timeLine->pos(), quantization() ) );
|
||||
|
||||
// select it
|
||||
cur_note.setSelected( true );
|
||||
|
||||
@@ -188,6 +188,13 @@ void Fader::mousePressEvent( QMouseEvent* mouseEvent )
|
||||
if( mouseEvent->button() == Qt::LeftButton &&
|
||||
! ( mouseEvent->modifiers() & Qt::ControlModifier ) )
|
||||
{
|
||||
AutomatableModel *thisModel = model();
|
||||
if( thisModel )
|
||||
{
|
||||
thisModel->addJournalCheckPoint();
|
||||
thisModel->saveJournallingState( false );
|
||||
}
|
||||
|
||||
if( mouseEvent->y() >= knobPosY() - ( *m_knob ).height() && mouseEvent->y() < knobPosY() )
|
||||
{
|
||||
updateTextFloat();
|
||||
@@ -245,8 +252,17 @@ void Fader::mouseDoubleClickEvent( QMouseEvent* mouseEvent )
|
||||
|
||||
|
||||
|
||||
void Fader::mouseReleaseEvent( QMouseEvent * _me )
|
||||
void Fader::mouseReleaseEvent( QMouseEvent * mouseEvent )
|
||||
{
|
||||
if( mouseEvent && mouseEvent->button() == Qt::LeftButton )
|
||||
{
|
||||
AutomatableModel *thisModel = model();
|
||||
if( thisModel )
|
||||
{
|
||||
thisModel->restoreJournallingState();
|
||||
}
|
||||
}
|
||||
|
||||
s_textFloat->hide();
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,8 @@ void LcdSpinBox::enterValue()
|
||||
arg( model()->maxValue() ),
|
||||
model()->value(),
|
||||
model()->minValue(),
|
||||
model()->maxValue(), 4, &ok );
|
||||
model()->maxValue(),
|
||||
model()->step<int>(), &ok );
|
||||
|
||||
if( ok )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user