mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-22 18:17:25 -05:00
Fix hotkeys not being registered for new macros
This commit is contained in:
parent
4d2c3e0f80
commit
925729e6b8
|
|
@ -16,7 +16,7 @@ constexpr auto macro_func = 10;
|
|||
|
||||
class Macro {
|
||||
public:
|
||||
Macro(const std::string &name = "");
|
||||
Macro(const std::string &name = "", const bool addHotkey = false);
|
||||
virtual ~Macro();
|
||||
|
||||
bool CeckMatch();
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ bool AdvSceneSwitcher::addNewMacro(std::string &name, std::string format)
|
|||
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switcher->macros.emplace_back(std::make_shared<Macro>(name));
|
||||
switcher->macros.emplace_back(
|
||||
std::make_shared<Macro>(name, true));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,9 +11,12 @@
|
|||
|
||||
constexpr int perfLogThreshold = 300;
|
||||
|
||||
Macro::Macro(const std::string &name)
|
||||
Macro::Macro(const std::string &name, const bool addHotkey)
|
||||
{
|
||||
SetName(name);
|
||||
if (addHotkey) {
|
||||
SetupHotkeys();
|
||||
}
|
||||
}
|
||||
|
||||
Macro::~Macro()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user