From 2db73efe0a4289cb8f900cd08fb45a469f83c0db Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 2 Jun 2016 16:27:37 +0200 Subject: [PATCH] Notebook: correct tab should now be activated after tab close --- src/notebook.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/notebook.cc b/src/notebook.cc index f4da5f9..1aad1fb 100644 --- a/src/notebook.cc +++ b/src/notebook.cc @@ -250,9 +250,10 @@ void Notebook::open(const boost::filesystem::path &file_path, size_t notebook_in notebook.set_current_page(notebook.get_n_pages()-1); last_index=-1; if(last_view) { - auto notebook_page=get_notebook_page(get_index(last_view)); + auto index=get_index(last_view); + auto notebook_page=get_notebook_page(index); if(notebook_page.first==notebook_index) - last_index=notebook_page.second; + last_index=index; } set_focus_child(*source_views.back());