Backspace opens slide picker (not paint) in viewer.

A recent change added the "Paint" section to the viewer tools window. The
code around forcing the slide picker open when the backspace key was
pressed was inadvertantly separated from the slide picker section, so
now the paint section is confusingly held open instead. This changes the
logic so that the slide picker is once again the target of backspace.

Change-Id: Ibfcb78bb0a1e2bdbb2ccce54b38e8206e0303753
Reviewed-on: https://skia-review.googlesource.com/122949
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2018-04-23 10:01:07 -04:00 committed by Skia Commit-Bot
parent b7eace414d
commit 7a3c6748f3

View File

@ -1342,10 +1342,6 @@ void Viewer::drawImGui() {
}
}
if (fShowSlidePicker) {
ImGui::SetNextTreeNodeOpen(true);
}
if (ImGui::CollapsingHeader("Paint")) {
int hintingIdx = 0;
if (fPaintOverrides.fHinting) {
@ -1445,6 +1441,9 @@ void Viewer::drawImGui() {
}
}
if (fShowSlidePicker) {
ImGui::SetNextTreeNodeOpen(true);
}
if (ImGui::CollapsingHeader("Slide")) {
static ImGuiTextFilter filter;
static ImVector<const char*> filteredSlideNames;