Fixed visual typesetting

Originally committed to SVN as r748.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-09 02:13:23 +00:00
parent 9c803be482
commit 241a837e44
3 changed files with 7 additions and 6 deletions

View File

@ -235,7 +235,7 @@ void SubsEditBox::SetSplitLineMode(wxSize newSize) {
/////////////////// ///////////////////
// Update function // Update function
void SubsEditBox::Update (bool timeOnly) { void SubsEditBox::Update (bool timeOnly,bool weak) {
if (enabled) { if (enabled) {
AssDialogue *curdiag = grid->GetDialogue(linen); AssDialogue *curdiag = grid->GetDialogue(linen);
if (curdiag) { if (curdiag) {
@ -264,7 +264,7 @@ void SubsEditBox::Update (bool timeOnly) {
} }
// Audio // Audio
audio->SetDialogue(grid,curdiag,linen); if (!weak) audio->SetDialogue(grid,curdiag,linen);
// Video // Video
video->curLine = curdiag; video->curLine = curdiag;
@ -308,7 +308,7 @@ void SubsEditBox::UpdateGlobals () {
////////////////// //////////////////
// Jump to a line // Jump to a line
void SubsEditBox::SetToLine(int n) { void SubsEditBox::SetToLine(int n,bool weak) {
// Set to nothing // Set to nothing
if (n == -1) { if (n == -1) {
enabled = false; enabled = false;
@ -329,7 +329,7 @@ void SubsEditBox::SetToLine(int n) {
Update(); Update();
// Set video // Set video
if (video->loaded) { if (video->loaded && !weak) {
wxString sync; wxString sync;
if (Search.hasFocus) sync = _T("Find update video"); if (Search.hasFocus) sync = _T("Find update video");
else sync = _T("Sync video with subs"); else sync = _T("Sync video with subs");

View File

@ -153,9 +153,9 @@ public:
void SetSplitLineMode(wxSize size=wxSize(-1,-1)); void SetSplitLineMode(wxSize size=wxSize(-1,-1));
void CommitText(bool weak=false); void CommitText(bool weak=false);
void Update(bool timeOnly=false); void Update(bool timeOnly=false,bool weak=false);
void UpdateGlobals(); void UpdateGlobals();
void SetToLine(int n); void SetToLine(int n,bool weak=false);
void UpdateFrameTiming(); void UpdateFrameTiming();
void KeyPress(wxKeyEvent &event); void KeyPress(wxKeyEvent &event);

View File

@ -481,6 +481,7 @@ void VideoDisplayVisual::OnMouseEvent (wxMouseEvent &event) {
// Mouse over? // Mouse over?
if (x >= lineX-5 && x <= lineX+5 && y >= lineY-5 && y <= lineY+5) { if (x >= lineX-5 && x <= lineX+5 && y >= lineY-5 && y <= lineY+5) {
parent->grid->editBox->SetToLine(i,true);
gotDiag = diag; gotDiag = diag;
orig_x = lineX; orig_x = lineX;
orig_y = lineY; orig_y = lineY;