File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -361,8 +361,7 @@ function main()
361361 qerror (' notes requires a fortress map to be loaded' )
362362 end
363363
364- view = view and view :raise () or NotesScreen {
365- }:show ()
364+ view = view and view :raise () or NotesScreen {}:show ()
366365end
367366
368367if not dfhack_flags .module then
Original file line number Diff line number Diff line change 3939local function arrange_gui_notes (options )
4040 options = options or {}
4141
42+ -- running tests removes all overlays because of IN_TEST reloading.
43+ -- rescan so we can load the gui/notes widget for these tests
44+ overlay .rescan ()
45+
4246 arrange_notes (options .notes )
4347
4448 gui_notes .main ()
4549
46- local gui_notes = gui_notes .view
47- gui_notes .enable_selector_blink = false
50+ local view = gui_notes .view
51+ view .enable_selector_blink = false
4852
49- gui_notes :updateLayout ()
50- gui_notes :onRender ()
51-
52- -- for some reasons running tests remove all overlays,
53- -- but there are need for gui/notes tests
54- overlay .rescan ()
53+ view :updateLayout ()
54+ view :onRender ()
5555
56- return gui_notes , gui_notes .subviews .notes_window
56+ return view , view .subviews .notes_window
5757end
5858
5959local function cleanup (gui_notes )
You can’t perform that action at this time.
0 commit comments