This PR fixes the problem when the Preferences window fails to open while running the latest code from the master branch (Issue #224).
In the existing code, the where() call is actually returning a tuple of arrays. When idx1 is set to the first element, it is actually being set to the first element of the tuple which is an array. This array is then passed to setCurrentIndex() which is expecting an integer.
The code has been updated as follows:
idx1 and idx2 have been renamed to idxs1 and idxs2 to reflect that they are actually a collection of indices and not a single index.
The first element of idxs1 and idxs2 is accessed and then passed to setCurrentIndex() since the first element contains the actual index.
This PR fixes the problem when the Preferences window fails to open while running the latest code from the master branch (Issue #224).
In the existing code, the where() call is actually returning a tuple of arrays. When idx1 is set to the first element, it is actually being set to the first element of the tuple which is an array. This array is then passed to setCurrentIndex() which is expecting an integer.
The code has been updated as follows: