From 24ef484944e696fae28dbd50dd3ff6cc7b1cd0b9 Mon Sep 17 00:00:00 2001 From: Jabba Laci Date: Thu, 19 Jun 2014 16:11:54 +0200 Subject: [PATCH] list must be sorted --- jabbapylib/apps/fftabs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jabbapylib/apps/fftabs.py b/jabbapylib/apps/fftabs.py index 10734b4..7387bbc 100755 --- a/jabbapylib/apps/fftabs.py +++ b/jabbapylib/apps/fftabs.py @@ -82,7 +82,7 @@ def option_count(): def option_close(args): total = ff.get_number_of_tabs() - li = [int(x) for x in args['ID'] if 0 <= int(x) < total] + li = sorted([int(x) for x in args['ID'] if 0 <= int(x) < total]) for pos, val in enumerate(li): # once a tab is closed, subsequent tabs are shifted one position to the left ff.put_focus_on_tab(val - pos)