X-Git-Url: https://git.pterodactylus.net/?p=synfig.git;a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Ftime.cpp;h=47a3306e468330e9897265629426111771fa74d7;hp=f9fae684fa5aa60543030d8eaab4a5be3b77c375;hb=40bd8542524fc63dc297997277e7d58e30a694b1;hpb=6d45356ea06941c2d8f814581c5516b862f9218d diff --git a/synfig-core/src/synfig/time.cpp b/synfig-core/src/synfig/time.cpp index f9fae68..47a3306 100644 --- 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. - 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])