You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
On the cheatsheet, the binding has a documentation string that can change at runtime.
A user may want to update this documentation manually, but the cheatsheet is updated internally by libf3d when an option is modified.
To Reproduce
Not tested but I put it here to have an idea:
std::string ip = "127.0.0.1";
auto docServer = [](const std::string& ip) { returnstd::make_pair("Load from server", ip); };
interactor.addCommand("select_server", [&](const std::vector<std::string>& args) { ip = args[1]; });
interactor.addCommand("load_from_selected_server", [&](const std::vector<std::string>&) { this->LoadFromServer(ip); });
interactor.addBinding({ mod_t::NONE, "W" }, "load_from_selected_server", "Others", std::bind(docServer, std::cref(ip)));
interactor.start();
Open the cheatsheet
Run select_server 192.168.0.1 in the console
The binding documentation in the cheatsheet is not updated
Expected behavior
The documentation should be updated.
A solution could be to update the cheatsheet after each command is triggered?
The text was updated successfully, but these errors were encountered:
Describe the bug
On the cheatsheet, the binding has a documentation string that can change at runtime.
A user may want to update this documentation manually, but the cheatsheet is updated internally by libf3d when an option is modified.
To Reproduce
Not tested but I put it here to have an idea:
select_server 192.168.0.1
in the consoleExpected behavior
The documentation should be updated.
A solution could be to update the cheatsheet after each command is triggered?
The text was updated successfully, but these errors were encountered: