From f0a32c986a4d7931419d8d240eed5c9d8c87c6c7 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 28 Oct 2017 02:06:05 +0200 Subject: [PATCH] LocationQuery: fix bugs and omissions --- src/gui/interact/gen-node-location-query.hpp | 26 +++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/gui/interact/gen-node-location-query.hpp b/src/gui/interact/gen-node-location-query.hpp index b01acec98..944436830 100644 --- a/src/gui/interact/gen-node-location-query.hpp +++ b/src/gui/interact/gen-node-location-query.hpp @@ -144,11 +144,11 @@ namespace interact { { size_t depth = 0; Rec const& node = drillDown (tree_, path, pos, depth); - if (pos != depth-1) + if (depth != pos) throw error::State(_Fmt{"unable to drill down to depth %d: " "element %s at pos %d in path %s is in " "contradiction to actual UI structure"} - % pos + % (pos+1) % (depth