mirror of https://github.com/odrling/Aegisub
Remove the undocumented milisecond precision option
Originally committed to SVN as r6121.
This commit is contained in:
parent
1fbf2ef218
commit
e36759a3b2
|
@ -119,8 +119,7 @@ void AssTime::ParseASS (const wxString text) {
|
|||
/// @return
|
||||
///
|
||||
int AssTime::GetMS () const {
|
||||
if (!UseMSPrecision) return time/10*10;
|
||||
else return time;
|
||||
return time / 10 * 10;
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,19 +137,17 @@ void AssTime::SetMS (int ms) {
|
|||
/// @return
|
||||
///
|
||||
wxString AssTime::GetASSFormated (bool msPrecision) const {
|
||||
int ms = time;
|
||||
|
||||
// Centisecond precision
|
||||
msPrecision = msPrecision || UseMSPrecision;
|
||||
if (!msPrecision) ms = ms/10*10;
|
||||
int ms = msPrecision ? time : GetMS();
|
||||
|
||||
int h = ms / (1000 * 60 * 60);
|
||||
int m = (ms / (1000 * 60)) % 60;
|
||||
int s = (ms / 1000) % 60;
|
||||
ms = ms % 1000;
|
||||
|
||||
if (msPrecision) return wxString::Format("%01i:%02i:%02i.%03i",h,m,s,ms);
|
||||
else return wxString::Format("%01i:%02i:%02i.%02i",h,m,s,ms/10);
|
||||
if (msPrecision)
|
||||
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
|
||||
|
@ -220,12 +217,6 @@ AssTime operator - (const AssTime &t1, const AssTime &t2) {
|
|||
return AssTime(t1.GetMS() - t2.GetMS());
|
||||
}
|
||||
|
||||
|
||||
/// DOCME
|
||||
bool AssTime::UseMSPrecision = false;
|
||||
|
||||
|
||||
|
||||
/// @brief Get
|
||||
/// @return
|
||||
///
|
||||
|
|
|
@ -54,9 +54,6 @@ class AssTime {
|
|||
int time;
|
||||
|
||||
public:
|
||||
/// DOCME
|
||||
static bool UseMSPrecision;
|
||||
|
||||
AssTime();
|
||||
AssTime(int ms);
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
"Local Config" : false,
|
||||
"Locale" : -1,
|
||||
"Maximized" : false,
|
||||
"Nonstandard Milisecond Times" : false,
|
||||
"Save Charset" : "UTF-8",
|
||||
"Toolbar Icon Size" : 16
|
||||
},
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
#include "ass_dialogue.h"
|
||||
#include "ass_export_filter.h"
|
||||
#include "ass_file.h"
|
||||
#include "ass_time.h"
|
||||
#include "audio_box.h"
|
||||
#include "auto4_base.h"
|
||||
#include "charset_conv.h"
|
||||
|
@ -248,7 +247,6 @@ bool AegisubApp::OnInit() {
|
|||
|
||||
StartupLog("Store options back");
|
||||
OPT_SET("Version/Last Version")->SetInt(GetSVNRevision());
|
||||
AssTime::UseMSPrecision = OPT_GET("App/Nonstandard Milisecond Times")->GetBool();
|
||||
|
||||
StartupLog("Initialize final locale");
|
||||
|
||||
|
|
Loading…
Reference in New Issue