[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/core Project.cpp Song.cpp Track.cpp
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/core Project.cpp Song.cpp Track.cpp |
Date: |
Wed, 04 Apr 2007 00:30:38 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/04/04 00:30:38
Modified files:
src/core : Project.cpp Song.cpp Track.cpp
Log message:
project from template fixes
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Project.cpp?cvsroot=traverso&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.cpp?cvsroot=traverso&r1=1.73&r2=1.74
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Track.cpp?cvsroot=traverso&r1=1.45&r2=1.46
Patches:
Index: Project.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Project.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- Project.cpp 4 Apr 2007 00:05:51 -0000 1.26
+++ Project.cpp 4 Apr 2007 00:30:38 -0000 1.27
@@ -50,7 +50,7 @@
: ContextItem(), title(pTitle)
{
PENTERCONS;
- m_currentSongId = -1;
+ m_currentSongId = 0;
engineer = "";
rootDir = config().get_property("Project", "directory",
"/directory/unknown/").toString() + "/" + title;
@@ -166,6 +166,9 @@
m_rate = e.attribute( "rate", "" ).toInt();
m_bitDepth = e.attribute( "bitdepth", "" ).toInt();
m_id = e.attribute("id", "0").toLongLong();
+ if (m_id == 0) {
+ m_id = create_id();
+ }
m_importDir = e.attribute("importdir", QDir::homePath());
@@ -186,7 +189,15 @@
songNode = songNode.nextSibling();
}
- set_current_song(e.attribute("currentSongId", "0" ).toLongLong());
+ qint64 id = e.attribute("currentSongId", "0" ).toLongLong();
+
+ if ( id == 0) {
+ if (m_songs.size()) {
+ id = m_songs.first()->get_id();
+ }
+ }
+
+ set_current_song(id);
info().information( tr("Project %1 loaded").arg(title) );
Index: Song.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.cpp,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- Song.cpp 4 Apr 2007 00:05:51 -0000 1.73
+++ Song.cpp 4 Apr 2007 00:30:38 -0000 1.74
@@ -165,6 +165,9 @@
PENTER;
QDomNode propertiesNode = node.firstChildElement("Properties");
m_id = node.toElement().attribute( "id", "" ).toLongLong();
+ if (m_id == 0) {
+ m_id = create_id();
+ }
QDomElement e = propertiesNode.toElement();
Index: Track.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Track.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- Track.cpp 3 Apr 2007 14:18:54 -0000 1.45
+++ Track.cpp 4 Apr 2007 00:30:38 -0000 1.46
@@ -143,6 +143,9 @@
set_bus_in( e.attribute( "InBus", "" ).toAscii() );
set_bus_out( e.attribute( "OutBus", "" ).toAscii() );
m_id = e.attribute( "id", "").toLongLong();
+ if (m_id == 0) {
+ m_id = create_id();
+ }
numtakes = e.attribute( "numtakes", "").toInt();
m_captureRightChannel = e.attribute("CaptureRightChannel", "1").toInt();
m_captureLeftChannel = e.attribute("CaptureLeftChannel", "1").toInt();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src/core Project.cpp Song.cpp Track.cpp,
Remon Sijrier <=