[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/core Sheet.cpp Sheet.h
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/core Sheet.cpp Sheet.h |
Date: |
Tue, 29 Jan 2008 09:11:56 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 08/01/29 09:11:56
Modified files:
src/core : Sheet.cpp Sheet.h
Log message:
* initialize values before they are used
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Sheet.cpp?cvsroot=traverso&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Sheet.h?cvsroot=traverso&r1=1.1&r2=1.2
Patches:
Index: Sheet.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Sheet.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- Sheet.cpp 28 Jan 2008 20:54:16 -0000 1.4
+++ Sheet.cpp 29 Jan 2008 09:11:55 -0000 1.5
@@ -73,7 +73,6 @@
title = tr("Untitled");
m_id = create_id();
artists = tr("No artists name set");
- m_hzoom = config().get_property("Sheet", "hzoomLevel", 8192).toInt();
init();
}
@@ -100,6 +99,14 @@
: ContextItem(), m_project(project)
{
PENTERCONS;
+
+ QDomNode propertiesNode = node.firstChildElement("Properties");
+ m_id = node.toElement().attribute("id", "0").toLongLong();
+
+ if (m_id == 0) {
+ m_id = create_id();
+ }
+
init();
set_state( node );
}
@@ -177,6 +184,7 @@
m_transportLocation = TimeRef();
m_mode = EDIT;
m_sbx = m_sby = 0;
+ m_hzoom = config().get_property("Sheet", "hzoomLevel", 8192).toInt();
m_pluginChain = new PluginChain(this, this);
m_fader = m_pluginChain->get_fader();
@@ -191,12 +199,8 @@
int Sheet::set_state( const QDomNode & node )
{
PENTER;
- QDomNode propertiesNode = node.firstChildElement("Properties");
- m_id = node.toElement().attribute("id", "0").toLongLong();
- if (m_id == 0) {
- m_id = create_id();
- }
+ QDomNode propertiesNode = node.firstChildElement("Properties");
QDomElement e = propertiesNode.toElement();
title = e.attribute( "title", "" );
@@ -1064,7 +1068,7 @@
m_playBackBus = audiodevice().get_playback_bus("Playback 1");
}
-const TimeRef& Sheet::get_last_location() const
+TimeRef Sheet::get_last_location() const
{
TimeRef lastAudio = m_acmanager->get_last_location();
Index: Sheet.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Sheet.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Sheet.h 21 Jan 2008 16:22:48 -0000 1.1
+++ Sheet.h 29 Jan 2008 09:11:56 -0000 1.2
@@ -88,7 +88,7 @@
const TimeRef& get_work_location() const {return m_workLocation;}
nframes_t get_first_visible_frame() const;
- const TimeRef& get_last_location() const;
+ TimeRef get_last_location() const;
const TimeRef& get_transport_location() const {return
m_transportLocation;}
const TimeRef& get_new_transport_location() const {return
m_newTransportLocation;}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src/core Sheet.cpp Sheet.h,
Remon Sijrier <=