From 2237384ca28fa311175b03ca8be7dcb32fbdde63 Mon Sep 17 00:00:00 2001 From: WanderingPenwing Date: Fri, 1 Mar 2024 21:47:11 +0100 Subject: [PATCH] no false trigger of opening project item --- Cargo.lock | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c809280..0871526 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -587,7 +587,7 @@ dependencies = [ [[package]] name = "calcifer" -version = "1.1.0" +version = "1.2.0" dependencies = [ "arboard", "eframe", diff --git a/src/main.rs b/src/main.rs index 52688fe..68c8c3d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -176,7 +176,7 @@ impl eframe::App for Calcifer { } } - if ctx.input(|i| i.key_pressed(egui::Key::Enter)) + if ctx.input(|i| i.key_pressed(egui::Key::Enter)) && ctx.memory(|m| m.focus() == None) && self.tabs[self.selected_tab].language == PROJECT_EXTENSION { self.project_content.item_window.visible = true;