Remove the undocumented milisecond precision option

Originally committed to SVN as r6121.
This commit is contained in:
Thomas Goyne 2011-12-22 21:28:32 +00:00
parent 1fbf2ef218
commit e36759a3b2
4 changed files with 6 additions and 21 deletions

View file

@ -119,8 +119,7 @@ void AssTime::ParseASS (const wxString text) {
/// @return /// @return
/// ///
int AssTime::GetMS () const { int AssTime::GetMS () const {
if (!UseMSPrecision) return time/10*10; return time / 10 * 10;
else return time;
} }
@ -138,19 +137,17 @@ void AssTime::SetMS (int ms) {
/// @return /// @return
/// ///
wxString AssTime::GetASSFormated (bool msPrecision) const { wxString AssTime::GetASSFormated (bool msPrecision) const {
int ms = time; int ms = msPrecision ? time : GetMS();
// Centisecond precision
msPrecision = msPrecision || UseMSPrecision;
if (!msPrecision) ms = ms/10*10;
int h = ms / (1000 * 60 * 60); int h = ms / (1000 * 60 * 60);
int m = (ms / (1000 * 60)) % 60; int m = (ms / (1000 * 60)) % 60;
int s = (ms / 1000) % 60; int s = (ms / 1000) % 60;
ms = ms % 1000; ms = ms % 1000;
if (msPrecision) return wxString::Format("%01i:%02i:%02i.%03i",h,m,s,ms); if (msPrecision)
else return wxString::Format("%01i:%02i:%02i.%02i",h,m,s,ms/10); return wxString::Format("%01i:%02i:%02i.%03i",h,m,s,ms);
else
return wxString::Format("%01i:%02i:%02i.%02i",h,m,s,ms/10);
} }
/// @brief AssTime comparison /// @brief AssTime comparison
@ -220,12 +217,6 @@ AssTime operator - (const AssTime &t1, const AssTime &t2) {
return AssTime(t1.GetMS() - t2.GetMS()); return AssTime(t1.GetMS() - t2.GetMS());
} }
/// DOCME
bool AssTime::UseMSPrecision = false;
/// @brief Get /// @brief Get
/// @return /// @return
/// ///

View file

@ -54,9 +54,6 @@ class AssTime {
int time; int time;
public: public:
/// DOCME
static bool UseMSPrecision;
AssTime(); AssTime();
AssTime(int ms); AssTime(int ms);

View file

@ -12,7 +12,6 @@
"Local Config" : false, "Local Config" : false,
"Locale" : -1, "Locale" : -1,
"Maximized" : false, "Maximized" : false,
"Nonstandard Milisecond Times" : false,
"Save Charset" : "UTF-8", "Save Charset" : "UTF-8",
"Toolbar Icon Size" : 16 "Toolbar Icon Size" : 16
}, },

View file

@ -61,7 +61,6 @@
#include "ass_dialogue.h" #include "ass_dialogue.h"
#include "ass_export_filter.h" #include "ass_export_filter.h"
#include "ass_file.h" #include "ass_file.h"
#include "ass_time.h"
#include "audio_box.h" #include "audio_box.h"
#include "auto4_base.h" #include "auto4_base.h"
#include "charset_conv.h" #include "charset_conv.h"
@ -248,7 +247,6 @@ bool AegisubApp::OnInit() {
StartupLog("Store options back"); StartupLog("Store options back");
OPT_SET("Version/Last Version")->SetInt(GetSVNRevision()); OPT_SET("Version/Last Version")->SetInt(GetSVNRevision());
AssTime::UseMSPrecision = OPT_GET("App/Nonstandard Milisecond Times")->GetBool();
StartupLog("Initialize final locale"); StartupLog("Initialize final locale");