mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 14:58:05 +08:00
Fix active tool selection (#92)
This commit is contained in:
committed by
Keavon Chambers
parent
3ab5f6b7ef
commit
c540d781e1
@@ -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));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user