~mil/nominatim-gui-scripts

54417c25d5d0c8c1070d7b1e1979c00473e8a0d0 — Miles Alan 1 year, 5 months ago 27f5800
Correct picking of items for 2nd entry when using 2 entries
1 files changed, 8 insertions(+), 1 deletions(-)

M nominatim.sh
M nominatim.sh => nominatim.sh +8 -1
@@ 158,9 158,16 @@ run() {
  ROWN="$(gtke "gtk_tree_model_get_string_from_iter $SEARCHA_LIST $ITER" | xargs -IN echo N + 1 | bc)"
  echo "$SEARCHA_RESULTS" | sed -n ${ROWN}p

  [ $NENTRIES = 2 ] && echo "$SEARCHB_RESULTS" | sed -n ${ROWN}p
  if [ $NENTRIES = 2 ]; then
    ITER="$(gtke "gtk_server_opaque")"
    SEL="$(gtk "gtk_tree_view_get_selection $SEARCHB_TREE")"
    HASSEL="$(gtk "gtk_tree_selection_get_selected $SEL NULL $ITER")"
    ROWN="$(gtke "gtk_tree_model_get_string_from_iter $SEARCHB_LIST $ITER" | xargs -IN echo N + 1 | bc)"
    echo "$SEARCHB_RESULTS" | sed -n ${ROWN}p
  fi

  gtkq "gtk_server_exit"
  pkill gtk-server-gtk3
}

run $1