Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions gui/notes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ function main()
qerror('notes requires a fortress map to be loaded')
end

view = view and view:raise() or NotesScreen{
}:show()
view = view and view:raise() or NotesScreen{}:show()
end

if not dfhack_flags.module then
Expand Down
18 changes: 9 additions & 9 deletions test/gui/notes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ end
local function arrange_gui_notes(options)
options = options or {}

-- running tests removes all overlays because of IN_TEST reloading.
-- rescan so we can load the gui/notes widget for these tests
overlay.rescan()

arrange_notes(options.notes)

gui_notes.main()

local gui_notes = gui_notes.view
gui_notes.enable_selector_blink = false
local view = gui_notes.view
view.enable_selector_blink = false

gui_notes:updateLayout()
gui_notes:onRender()

-- for some reasons running tests remove all overlays,
-- but there are need for gui/notes tests
overlay.rescan()
view:updateLayout()
view:onRender()

return gui_notes, gui_notes.subviews.notes_window
return view, view.subviews.notes_window
end

local function cleanup(gui_notes)
Expand Down