Fix active tool selection (#92)

This commit is contained in:
TrueDoctor
2021-05-07 02:47:38 -07:00
committed by Keavon Chambers
parent 3ab5f6b7ef
commit c540d781e1
2 changed files with 5 additions and 2 deletions
@@ -332,7 +332,8 @@ export default defineComponent({
this.viewportSvg = responseData; this.viewportSvg = responseData;
}); });
registerResponseHandler(ResponseType["Tool::SetActiveTool"], (responseData) => { registerResponseHandler(ResponseType["Tool::SetActiveTool"], (responseData) => {
this.activeTool = responseData; const [activeTool] = responseData;
this.activeTool = activeTool;
}); });
window.addEventListener("keyup", (e: KeyboardEvent) => this.keyUp(e)); window.addEventListener("keyup", (e: KeyboardEvent) => this.keyUp(e));
+3 -1
View File
@@ -140,7 +140,9 @@ impl Dispatcher {
pub fn dispatch_response<T: Into<Response>>(&self, response: T) { pub fn dispatch_response<T: Into<Response>>(&self, response: T) {
let func = &self.callback; 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 { pub fn new(callback: Callback) -> Dispatcher {