From 7a3c6748f3252978b7c8c0f053cd5ed14e00524d Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Mon, 23 Apr 2018 10:01:07 -0400 Subject: [PATCH] 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 Commit-Queue: Ben Wagner --- tools/viewer/Viewer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 3172244bf7..7bd9a69508 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -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 filteredSlideNames;