'Get the real index of the selected item.'

def get_stack_index(self, stack_index, plugin_index):

    other_plugins_count = sum([other_tabs[0].count() for other_tabs in self.plugins_tabs[:plugin_index]])
    real_index = (stack_index - other_plugins_count)
    return real_index
