From e6274355d4f80684fff371b971f935dd7fd6f829 Mon Sep 17 00:00:00 2001
From: qjasn <1766684296@qq.com>
Date: Sat, 27 Jan 2024 19:31:41 +0800
Subject: [PATCH] Fix bug
---
.idea/workspace.xml | 19 ++++++++++++++-----
ui/equation_ui.py | 5 ++---
ui/function_ui.py | 3 +--
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1f93d65..82ce945 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,10 @@
-
+
-
-
+
+
@@ -254,7 +254,15 @@
1706353588301
-
+
+
+ 1706354382858
+
+
+
+ 1706354382858
+
+
@@ -273,6 +281,7 @@
-
+
+
\ No newline at end of file
diff --git a/ui/equation_ui.py b/ui/equation_ui.py
index 9a2261c..7d9c70c 100644
--- a/ui/equation_ui.py
+++ b/ui/equation_ui.py
@@ -84,7 +84,7 @@ def create_ui(self, element, _list):
height=self.max_height,
)
], scroll=ScrollMode.AUTO,
- width=(((self.page.width - 100) / 7) * 1.8 - 35) if self.page.width > 550 else (
+ width=(((self.page.width - 100) / 7) * 1.8 - 35) if self.page.width > 550 else (
self.page.width - 55)
)
], top=5
@@ -101,9 +101,8 @@ def create_ui(self, element, _list):
)
], width=(((self.page.width - 100) / 7) * 1.8) if self.page.width > 550 else self.page.width,
- height=50
)
],
- height=50
+ height=(self.latex_image[1] + self.max_height) + 45
)
return self.ui
diff --git a/ui/function_ui.py b/ui/function_ui.py
index b99df19..5d21cf1 100644
--- a/ui/function_ui.py
+++ b/ui/function_ui.py
@@ -31,11 +31,10 @@ def on_change(self, e):
def on_click(self, _list=None, element=None):
# 该函数在点击 删除 时调用
UString.lists.remove(_list) # 从lists删除对应的结构化函数
- print(UString.a_e)
+ UString.draw_class[_list["name"]].delete() # 清除函数图像
UString.a_e.remove(_list["name"]) # 删除存在的函数名称
UString.draw_class.pop(_list["name"])
element.content.controls.remove(self.ui) # 从页面删除此元素
- UString.draw_class[_list["name"]].delete() # 清除函数图像
UString.matplot_chart.update_draw() # 更新UI
self.page.update()