forked from mia/Aegisub
Actually save the video zoom to the subtitles file
Originally committed to SVN as r6948.
This commit is contained in:
parent
65d3c4cc2d
commit
8ba149a7e6
2 changed files with 8 additions and 0 deletions
|
@ -115,6 +115,8 @@ VideoDisplay::VideoDisplay(
|
||||||
slots.push_back(con->videoController->AddVideoOpenListener(&VideoDisplay::UpdateSize, this));
|
slots.push_back(con->videoController->AddVideoOpenListener(&VideoDisplay::UpdateSize, this));
|
||||||
slots.push_back(con->videoController->AddARChangeListener(&VideoDisplay::UpdateSize, this));
|
slots.push_back(con->videoController->AddARChangeListener(&VideoDisplay::UpdateSize, this));
|
||||||
|
|
||||||
|
slots.push_back(con->ass->AddFileSaveListener(&VideoDisplay::OnSubtitlesSave, this));
|
||||||
|
|
||||||
Bind(wxEVT_PAINT, std::tr1::bind(&VideoDisplay::Render, this));
|
Bind(wxEVT_PAINT, std::tr1::bind(&VideoDisplay::Render, this));
|
||||||
Bind(wxEVT_SIZE, &VideoDisplay::OnSizeEvent, this);
|
Bind(wxEVT_SIZE, &VideoDisplay::OnSizeEvent, this);
|
||||||
Bind(wxEVT_CONTEXT_MENU, &VideoDisplay::OnContextMenu, this);
|
Bind(wxEVT_CONTEXT_MENU, &VideoDisplay::OnContextMenu, this);
|
||||||
|
@ -427,3 +429,7 @@ void VideoDisplay::Unload() {
|
||||||
videoOut.reset();
|
videoOut.reset();
|
||||||
tool.reset();
|
tool.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VideoDisplay::OnSubtitlesSave() {
|
||||||
|
con->ass->SetScriptInfo("Video Zoom Percent", wxString::Format("%g", zoomValue));
|
||||||
|
}
|
||||||
|
|
|
@ -144,6 +144,8 @@ class VideoDisplay : public wxGLCanvas {
|
||||||
void OnSizeEvent(wxSizeEvent &event);
|
void OnSizeEvent(wxSizeEvent &event);
|
||||||
void OnContextMenu(wxContextMenuEvent&);
|
void OnContextMenu(wxContextMenuEvent&);
|
||||||
|
|
||||||
|
void OnSubtitlesSave();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// @brief Constructor
|
/// @brief Constructor
|
||||||
VideoDisplay(
|
VideoDisplay(
|
||||||
|
|
Loading…
Reference in a new issue