Fix active tool selection (#92)

This commit is contained in:
TrueDoctor 2021-05-02 08:30:51 +02:00 committed by Keavon Chambers
parent f05cb30acb
commit 8d683a4162
2 changed files with 5 additions and 2 deletions

View File

@ -332,7 +332,8 @@ export default defineComponent({
this.viewportSvg = responseData;
});
registerResponseHandler(ResponseType["Tool::SetActiveTool"], (responseData) => {
this.activeTool = responseData;
const [activeTool] = responseData;
this.activeTool = activeTool;
});
window.addEventListener("keyup", (e: KeyboardEvent) => this.keyUp(e));

View File

@ -140,7 +140,9 @@ impl Dispatcher {
pub fn dispatch_response<T: Into<Response>>(&self, response: T) {
let func = &self.callback;
func(response.into())
let response: Response = response.into();
log::trace!("Sending {} Response", response);
func(response)
}
pub fn new(callback: Callback) -> Dispatcher {