Fixed bug #490 - rotation visual tools weren't updated after manual text edit.

Originally committed to SVN as r1441.
This commit is contained in:
Rodrigo Braz Monteiro 2007-07-27 04:50:15 +00:00
parent 6110808dad
commit 7a19d18942
5 changed files with 27 additions and 8 deletions

View file

@ -390,8 +390,9 @@ void VideoContext::Refresh (bool video, bool subtitles) {
// Reset frame // Reset frame
lastFrame = -1; lastFrame = -1;
// Get provider // Update subtitles
if (subtitles && subsProvider) { if (subtitles && subsProvider) {
// Re-export
AssExporter exporter(grid->ass); AssExporter exporter(grid->ass);
exporter.AddAutoFilters(); exporter.AddAutoFilters();
subsProvider->LoadSubtitles(exporter.ExportTransform()); subsProvider->LoadSubtitles(exporter.ExportTransform());
@ -412,7 +413,7 @@ void VideoContext::JumpToFrame(int n) {
if (isPlaying && n != playNextFrame) return; if (isPlaying && n != playNextFrame) return;
// Threaded // Threaded
if (threaded) { // Doesn't work, so it's disabled if (threaded && false) { // Doesn't work, so it's disabled
wxMutexLocker lock(vidMutex); wxMutexLocker lock(vidMutex);
threadNextFrame = n; threadNextFrame = n;
if (!threadLocked) { if (!threadLocked) {

View file

@ -53,9 +53,7 @@ VisualToolRotateXY::VisualToolRotateXY(VideoDisplay *_parent)
: VisualTool(_parent) : VisualTool(_parent)
{ {
_parent->ShowCursor(false); _parent->ShowCursor(false);
AssDialogue *line = GetActiveDialogueLine(); DoRefresh();
GetLinePosition(line,odx,ody,orgx,orgy);
GetLineRotation(line,curAngleX,curAngleY,rz);
} }
@ -264,3 +262,12 @@ void VisualToolRotateXY::UpdateDrag(VisualDraggableFeature &feature) {
void VisualToolRotateXY::CommitDrag(VisualDraggableFeature &feature) { void VisualToolRotateXY::CommitDrag(VisualDraggableFeature &feature) {
SetOverride(_T("\\org"),wxString::Format(_T("(%i,%i)"),feature.x,feature.y)); SetOverride(_T("\\org"),wxString::Format(_T("(%i,%i)"),feature.x,feature.y));
} }
///////////
// Refresh
void VisualToolRotateXY::DoRefresh() {
AssDialogue *line = GetActiveDialogueLine();
GetLinePosition(line,odx,ody,orgx,orgy);
GetLineRotation(line,curAngleX,curAngleY,rz);
}

View file

@ -61,6 +61,8 @@ private:
void UpdateDrag(VisualDraggableFeature &feature); void UpdateDrag(VisualDraggableFeature &feature);
void CommitDrag(VisualDraggableFeature &feature); void CommitDrag(VisualDraggableFeature &feature);
void DoRefresh();
public: public:
VisualToolRotateXY(VideoDisplay *parent); VisualToolRotateXY(VideoDisplay *parent);

View file

@ -53,9 +53,7 @@ VisualToolRotateZ::VisualToolRotateZ(VideoDisplay *_parent)
: VisualTool(_parent) : VisualTool(_parent)
{ {
_parent->ShowCursor(false); _parent->ShowCursor(false);
AssDialogue *line = GetActiveDialogueLine(); DoRefresh();
GetLinePosition(line,odx,ody,orgx,orgy);
GetLineRotation(line,rx,ry,curAngle);
} }
@ -230,3 +228,12 @@ void VisualToolRotateZ::UpdateDrag(VisualDraggableFeature &feature) {
void VisualToolRotateZ::CommitDrag(VisualDraggableFeature &feature) { void VisualToolRotateZ::CommitDrag(VisualDraggableFeature &feature) {
SetOverride(_T("\\org"),wxString::Format(_T("(%i,%i)"),feature.x,feature.y)); SetOverride(_T("\\org"),wxString::Format(_T("(%i,%i)"),feature.x,feature.y));
} }
///////////
// Refresh
void VisualToolRotateZ::DoRefresh() {
AssDialogue *line = GetActiveDialogueLine();
GetLinePosition(line,odx,ody,orgx,orgy);
GetLineRotation(line,rx,ry,curAngle);
}

View file

@ -60,6 +60,8 @@ private:
void UpdateDrag(VisualDraggableFeature &feature); void UpdateDrag(VisualDraggableFeature &feature);
void CommitDrag(VisualDraggableFeature &feature); void CommitDrag(VisualDraggableFeature &feature);
void DoRefresh();
public: public:
VisualToolRotateZ(VideoDisplay *parent); VisualToolRotateZ(VideoDisplay *parent);