Temporary hack to make the visual typesetting tool mode hotkeys work

Originally committed to SVN as r5445.
This commit is contained in:
Thomas Goyne 2011-07-15 04:03:48 +00:00
parent 3df2885ce5
commit 9c97544fc5

View file

@ -448,27 +448,20 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
ShowCursor(activeMode != Video_Mode_Standard); ShowCursor(activeMode != Video_Mode_Standard);
} }
void VideoDisplay::OnKeyDown(wxKeyEvent &event) { void VideoDisplay::OnKeyDown(wxKeyEvent &event) {
event.StopPropagation(); /// @todo
if (hotkey::check("Video Display", event.GetKeyCode(), event.GetUnicodeKey(), event.GetModifiers())) int kc = event.GetKeyCode();
return; if (kc == 'A') SetMode(Video_Mode_Standard);
else if (kc == 'S') SetMode(Video_Mode_Drag);
/* else if (kc == 'D') SetMode(Video_Mode_Rotate_Z);
int key = event.GetKeyCode(); else if (kc == 'F') SetMode(Video_Mode_Rotate_XY);
#ifdef __APPLE__ else if (kc == 'G') SetMode(Video_Mode_Scale);
Hotkeys.SetPressed(key, event.m_metaDown, event.m_altDown, event.m_shiftDown); else if (kc == 'H') SetMode(Video_Mode_Clip);
#else else if (kc == 'J') SetMode(Video_Mode_Vector_Clip);
Hotkeys.SetPressed(key, event.m_controlDown, event.m_altDown, event.m_shiftDown); else {
#endif event.StopPropagation();
if (hotkey::check("Video Display", event.GetKeyCode(), event.GetUnicodeKey(), event.GetModifiers()))
if (Hotkeys.IsPressed(L"Visual Tool Default")) SetMode(Video_Mode_Standard); return;
else if (Hotkeys.IsPressed(L"Visual Tool Drag")) SetMode(Video_Mode_Drag); }
else if (Hotkeys.IsPressed(L"Visual Tool Rotate Z")) SetMode(Video_Mode_Rotate_Z);
else if (Hotkeys.IsPressed(L"Visual Tool Rotate X/Y")) SetMode(Video_Mode_Rotate_XY);
else if (Hotkeys.IsPressed(L"Visual Tool Scale")) SetMode(Video_Mode_Scale);
else if (Hotkeys.IsPressed(L"Visual Tool Rectangular Clip")) SetMode(Video_Mode_Clip);
else if (Hotkeys.IsPressed(L"Visual Tool Vector Clip")) SetMode(Video_Mode_Vector_Clip);
event.Skip();
*/
} }