Repository navigation
fix(editor): Server List undo steps after a click, and the bar's tooltip only on hover - #846
Merged
Merged
Conversation
The item tool tests drew their windows in a TestImGuiContext of their own file. The Server List window test of the next commit draws an editor window the same way, so the context moves to tests/data/TestImGuiContext.h.
…tep of its own A text field's edit became an undo step only once no widget was active. Leaving the field with a click on a button or box made that widget active, and its change, made on release, joined the typed text in one step: renaming Helheim to Asgard and clicking Move up gave one step "Move Asgard", and one Undo took back both. A name followed by a click into the description became one step too. Leaving a field now ends its edit as a step, and a button, the test server box and a channel type first make what was typed a step before they change the groups. The new window test types into the fields and presses the widgets in the same frame, as ImGui's activation does; the server list tests link Winmain.cpp for the editor's globals, as the item tool tests do.
RenderBarButtons asked the tool for the names of its next Undo and Redo on every frame, also when no tooltip showed; for the Server List window that compared the group lists and formatted a text each frame while a change was typed. The names are asked for only while a button is hovered, as before the shared Undo and Redo, and whether a step is left is asked again after a click.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Two follow-ups to #845 (the Server List window):
docs/server-list.md now says what one undo step is.
Testing
Server List windowtests inserver_list_data_testsdraw the window without a renderer, type into the name field and then press Move down, the test server box or the description field, and check that the typed name is an undo step of its own. The server list tests link Winmain.cpp for the editor's globals now, as the item tool tests do;TestImGuiContextmoved totests/data/TestImGuiContext.hfor both.server_list_data_tests: 41/41 pass; the item tool tests (test_item_database_files,[editor]): 46/46 pass (Windows, Release, editor build).Commits