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

View File

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

View File

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