projects
/
synfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d45356
)
Assume frames when no unit provided in a time field. Apply feature request ID: 2879693
author
Carlos Lopez
<genetita@gmail.com>
Mon, 25 Oct 2010 17:33:52 +0000
(19:33 +0200)
committer
Carlos Lopez
<genetita@gmail.com>
Mon, 25 Oct 2010 17:33:52 +0000
(19:33 +0200)
synfig-core/src/synfig/time.cpp
patch
|
blob
|
history
diff --git
a/synfig-core/src/synfig/time.cpp
b/synfig-core/src/synfig/time.cpp
index
f9fae68
..
47a3306
100644
(file)
--- a/
synfig-core/src/synfig/time.cpp
+++ b/
synfig-core/src/synfig/time.cpp
@@
-114,9
+114,16
@@
Time::Time(const String &str_, float fps):
// and the amount isn't zero. There is no need
// to warn about units if the value is zero
// it is the only case where units are irrelevant.
// and the amount isn't zero. There is no need
// to warn about units if the value is zero
// it is the only case where units are irrelevant.
- if(amount!=0)
- synfig::warning("Time(): No unit provided in time code, assuming SECONDS (\"%s\")",str.c_str());
- value_+=amount;
+ if(amount!=0 && fps)
+ {
+ synfig::warning(_("Time(): No unit provided in time code, assuming FRAMES (\"%s\")"),str.c_str());
+ value_+=amount/fps;
+ }
+ else
+ {
+ synfig::warning(_("Time(): No unit provided in time code and frame rate is unknown! Assuming SECONDS"));
+ value_+=amount;
+ }
return;
}
switch(str[pos])
return;
}
switch(str[pos])