Skip to content

Commit 8ad4fa1

Browse files
Polishing gui notes
1 parent 5ff4e50 commit 8ad4fa1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

gui/notes.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ function NotesWindow:init()
7979
frame={l=0,b=2},
8080
frame_inset={t=1},
8181
row_height=1,
82+
on_select=function (ind, note)
83+
self:loadNote(note)
84+
end,
8285
on_submit=function (ind, note)
8386
self:loadNote(note)
8487
dfhack.gui.pauseRecenter(note.point.pos)
@@ -300,9 +303,9 @@ function NotesScreen:onInput(keys)
300303
local manager = note_manager.NoteManager{
301304
note=nil,
302305
on_update=function()
303-
self.subviews.notes_window:reloadFilteredNotes()
304306
dfhack.run_command_silent('overlay trigger notes.map_notes')
305-
self:dismiss()
307+
self.subviews.notes_window:reloadFilteredNotes()
308+
self:stopNoteAdd()
306309
end,
307310
on_dismiss=function()
308311
self:stopNoteAdd()

internal/notes/note_manager.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ function NoteManager:init()
5454
frame={t=6,b=3},
5555
frame_style=gui.FRAME_INTERIOR,
5656
init_text=self.note and self.note.point.comment or '',
57-
-- init_cursor=1
5857
},
5958
widgets.Panel{
6059
view_id='buttons',

0 commit comments

Comments
 (0)