Skip to content
Extraits de code Groupes Projets
Valider b19737c6 rédigé par Rodrigo Braz Monteiro's avatar Rodrigo Braz Monteiro
Parcourir les fichiers

Fixed copying of video coordinates to clipboard.

Originally committed to SVN as r1934.
parent 03d4f3fc
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -458,6 +458,10 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) { ...@@ -458,6 +458,10 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
// Locked? // Locked?
if (locked) return; if (locked) return;
// Mouse coordinates
mouse_x = event.GetX();
mouse_y = event.GetY();
// Disable when playing // Disable when playing
if (VideoContext::Get()->IsPlaying()) return; if (VideoContext::Get()->IsPlaying()) return;
...@@ -643,8 +647,8 @@ void VideoDisplay::OnCopyCoords(wxCommandEvent &event) { ...@@ -643,8 +647,8 @@ void VideoDisplay::OnCopyCoords(wxCommandEvent &event) {
if (wxTheClipboard->Open()) { if (wxTheClipboard->Open()) {
int sw,sh; int sw,sh;
VideoContext::Get()->GetScriptSize(sw,sh); VideoContext::Get()->GetScriptSize(sw,sh);
int vx = (sw * visual->mouseX + w/2) / w; int vx = (sw * mouse_x + w/2) / w;
int vy = (sh * visual->mouseY + h/2) / h; int vy = (sh * mouse_y + h/2) / h;
wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%i,%i"),vx,vy))); wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%i,%i"),vx,vy)));
wxTheClipboard->Close(); wxTheClipboard->Close();
} }
......
...@@ -73,6 +73,7 @@ private: ...@@ -73,6 +73,7 @@ private:
wxSize origSize; wxSize origSize;
int w,h; int w,h;
int dx1,dx2,dy1,dy2; int dx1,dx2,dy1,dy2;
int mouse_x,mouse_y;
bool locked; bool locked;
void DrawTVEffects(); void DrawTVEffects();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter