diff --git a/aegisub/src/frame_main.h b/aegisub/src/frame_main.h index 42ff4f3cc..aa6e115ac 100644 --- a/aegisub/src/frame_main.h +++ b/aegisub/src/frame_main.h @@ -94,10 +94,10 @@ public: void DetachVideo(bool detach=true); void LoadVFR(wxString filename); -private: - agi::Context temp_context; +private: + void cmd_call(wxCommandEvent& event); AssFile *ass; diff --git a/aegisub/src/hotkey.cpp b/aegisub/src/hotkey.cpp index 7b4fc52ea..f5e354a9f 100644 --- a/aegisub/src/hotkey.cpp +++ b/aegisub/src/hotkey.cpp @@ -36,7 +36,8 @@ #include "aegisub/toolbar.h" #include "libresrc/libresrc.h" #include "command/command.h" - +#include "frame_main.h" +#include "main.h" namespace hotkey { @@ -68,6 +69,7 @@ void check(std::string context, int key_code, wchar_t key_char, int modifier) { std::string command; if (agi::hotkey::hotkey->Scan(context, combo, command) == 0) { + (*cmd::get(command))(&wxGetApp().frame->temp_context); } }