changeset 69:3867e9e1b94c

list to_front
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 10 Jun 2025 20:47:20 -0600
parents 694359b01e06
children f4e393a13d59
files src/luan_editor/Window.luan src/luan_editor/find.luan
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan_editor/Window.luan	Tue Jun 10 20:32:40 2025 -0600
+++ b/src/luan_editor/Window.luan	Tue Jun 10 20:47:20 2025 -0600
@@ -99,7 +99,7 @@
 	if location ~= nil then
 		list_window.location = location
 	end
-	list_window.visible = true
+	list_window.is_visible = true
 	list_scroll_pane.scroll_to_right()
 end
 
@@ -207,6 +207,9 @@
 	end)
 	frame.add_window_focus_listener(function()
 		list_view.selected_value = list_window_item
+		if list_window.is_visible then
+			list_window.to_front()
+		end
 	end)
 	frame.add_resize_stopped_listener( 200, function()
 		--logger.info(stringify(frame.size))
@@ -370,7 +373,7 @@
 	if location ~= nil then
 		frame.location = location
 	end
-	frame.visible = true
+	frame.is_visible = true
 	text_area.request_focus_in_window()
 	n_windows = n_windows + 1
 	return window
--- a/src/luan_editor/find.luan	Tue Jun 10 20:32:40 2025 -0600
+++ b/src/luan_editor/find.luan	Tue Jun 10 20:47:20 2025 -0600
@@ -151,7 +151,7 @@
 	local find_panel = new_panel{
 		constraints = "growy 0,growx"
 		layout = new_mig_layout("insets 8 16 0 16","[][grow][grow 0]")
-		visible = false
+		is_visible = false
 		children = {
 			new_label{
 				constraints = "right"
@@ -203,9 +203,9 @@
 			}
 		}
 	}
-	function window.show_find_panel(visible)
-		find_panel.visible = visible
-		if visible then
+	function window.show_find_panel(is_visible)
+		find_panel.is_visible = is_visible
+		if is_visible then
 			find_field.request_focus_in_window()
 			find_field.select_all()
 		else