~ubuntu-branches/ubuntu/utopic/lmms/utopic

« back to all changes in this revision

Viewing changes to src/core/song.cpp

  • Committer: Package Import Robot
  • Author(s): Israel Dahl
  • Date: 2014-04-30 18:49:37 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20140430184937-hozuuxonlbshciya
Tags: 1.0.1-src-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
749
749
                engine::automationEditor()->setCurrentPattern( NULL );
750
750
        }
751
751
 
 
752
        if( engine::pianoRoll() )
 
753
        {
 
754
                engine::pianoRoll()->reset();
 
755
        }
 
756
 
752
757
        m_tempoModel.reset();
753
758
        m_masterVolumeModel.reset();
754
759
        m_masterPitchModel.reset();
920
925
                {
921
926
                        if( node.nodeName() == "trackcontainer" )
922
927
                        {
923
 
                                ( (JournallingObject *)( this ) )->
924
 
                                        restoreState( node.toElement() );
 
928
                                ( (JournallingObject *)( this ) )->restoreState( node.toElement() );
925
929
                        }
926
930
                        else if( node.nodeName() == "controllers" )
927
931
                        {
930
934
                        else if( node.nodeName() == engine::fxMixer()->nodeName() )
931
935
                        {
932
936
                                engine::fxMixer()->restoreState( node.toElement() );
933
 
                                if( engine::hasGUI() )
934
 
                                {
935
 
                                        // refresh FxMixerView
936
 
                                        engine::fxMixerView()->refreshDisplay();
937
 
                                }
938
937
                        }
939
938
                        else if( engine::hasGUI() )
940
939
                        {
941
 
                                if( node.nodeName() ==
942
 
                                        engine::getControllerRackView()->nodeName() )
 
940
                                if( node.nodeName() == engine::getControllerRackView()->nodeName() )
943
941
                                {
944
 
                                        engine::getControllerRackView()->
945
 
                                                restoreState( node.toElement() );
 
942
                                        engine::getControllerRackView()->restoreState( node.toElement() );
946
943
                                }
947
944
                                else if( node.nodeName() == engine::pianoRoll()->nodeName() )
948
945
                                {
949
946
                                        engine::pianoRoll()->restoreState( node.toElement() );
950
947
                                }
951
 
                                else if( node.nodeName() ==
952
 
                                        engine::automationEditor()->
953
 
                                                                nodeName() )
954
 
                                {
955
 
                                        engine::automationEditor()->
956
 
                                                restoreState( node.toElement() );
957
 
                                }
958
 
                                else if( node.nodeName() ==
959
 
                                                engine::getProjectNotes()->
960
 
                                                                nodeName() )
961
 
                                {
962
 
                                         engine::getProjectNotes()->
963
 
                        SerializingObject::restoreState( node.toElement() );
964
 
                                }
965
 
                                else if( node.nodeName() ==
966
 
                                                m_playPos[Mode_PlaySong].
967
 
                                                        m_timeLine->nodeName() )
968
 
                                {
969
 
                                        m_playPos[Mode_PlaySong].
970
 
                                                m_timeLine->restoreState(
971
 
                                                        node.toElement() );
 
948
                                else if( node.nodeName() == engine::automationEditor()->nodeName() )
 
949
                                {
 
950
                                        engine::automationEditor()->restoreState( node.toElement() );
 
951
                                }
 
952
                                else if( node.nodeName() == engine::getProjectNotes()->nodeName() )
 
953
                                {
 
954
                                         engine::getProjectNotes()->SerializingObject::restoreState( node.toElement() );
 
955
                                }
 
956
                                else if( node.nodeName() == m_playPos[Mode_PlaySong].m_timeLine->nodeName() )
 
957
                                {
 
958
                                        m_playPos[Mode_PlaySong].m_timeLine->restoreState( node.toElement() );
972
959
                                }
973
960
                        }
974
961
                }
1024
1011
                engine::getControllerRackView()->saveState( dataFile, dataFile.content() );
1025
1012
                engine::pianoRoll()->saveState( dataFile, dataFile.content() );
1026
1013
                engine::automationEditor()->saveState( dataFile, dataFile.content() );
1027
 
                engine::getProjectNotes()->
1028
 
                        SerializingObject::saveState( dataFile, dataFile.content() );
1029
 
                m_playPos[Mode_PlaySong].m_timeLine->saveState(
1030
 
                                                        dataFile, dataFile.content() );
 
1014
                engine::getProjectNotes()->SerializingObject::saveState( dataFile, dataFile.content() );
 
1015
                m_playPos[Mode_PlaySong].m_timeLine->saveState( dataFile, dataFile.content() );
1031
1016
        }
1032
1017
 
1033
1018
        saveControllerStates( dataFile, dataFile.content() );
1034
1019
 
1035
 
    return dataFile.writeFile( _filename );
 
1020
        return dataFile.writeFile( _filename );
1036
1021
}
1037
1022
 
1038
1023
 
1177
1162
                efd.setFileMode( FileDialog::AnyFile );
1178
1163
                int idx = 0;
1179
1164
                QStringList types;
1180
 
                while( __fileEncodeDevices[idx].m_fileFormat !=
1181
 
                                                ProjectRenderer::NumFileFormats )
 
1165
                while( __fileEncodeDevices[idx].m_fileFormat != ProjectRenderer::NumFileFormats )
1182
1166
                {
1183
1167
                        types << tr( __fileEncodeDevices[idx].m_description );
1184
1168
                        ++idx;
1229
1213
        {
1230
1214
                m_modified = true;
1231
1215
                if( engine::mainWindow() &&
1232
 
                        QThread::currentThread() ==
1233
 
                                        engine::mainWindow()->thread() )
 
1216
                        QThread::currentThread() == engine::mainWindow()->thread() )
1234
1217
                {
1235
1218
                        engine::mainWindow()->resetWindowTitle();
1236
1219
                }
1268
1251
}
1269
1252
 
1270
1253
 
1271
 
 
1272
 
 
1273
 
bool song::isLoadingProject()
1274
 
{
1275
 
        return m_loadingProject;
1276
 
}
1277
 
 
1278
 
 
1279
1254
#include "moc_song.cxx"
1280
1255
 
1281
1256