Fixed bug #490 - rotation visual tools weren't updated after manual text edit.
Originally committed to SVN as r1441.
This commit is contained in:
parent
6110808dad
commit
7a19d18942
5 changed files with 27 additions and 8 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue