diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-22 12:08:49 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-22 12:08:49 +0200 |
commit | 0009b23bb5f8e625baffcd763401d646459d4065 (patch) | |
tree | fe072bdc6dd17177ab718c21bc12a9de0a51a120 /src | |
parent | Merge commit 'refs/merge-requests/1561' of git://gitorious.org/rekonq/mainlin... (diff) | |
parent | Fixed problem with the add tab button of tab bar (diff) | |
download | rekonq-0009b23bb5f8e625baffcd763401d646459d4065.tar.xz |
Merge commit 'refs/merge-requests/1564' of git://gitorious.org/rekonq/mainline into shaaneb
Diffstat (limited to 'src')
-rw-r--r-- | src/tabbar.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp index d676af55..3f3faabc 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -73,7 +73,18 @@ TabBar::~TabBar() void TabBar::postLaunch() { - m_addTabButton->setDefaultAction(Application::instance()->mainWindow()->actionByName("new_tab")); + // Find the correct MainWindow of this tab button + MainWindowList list = Application::instance()->mainWindowList(); + MainWindow *window; + foreach (window, list) + { + if (window->isAncestorOf(this)) + { + m_addTabButton->setDefaultAction(window->actionByName("new_tab")); + break; + } + } + m_addTabButton->setAutoRaise(true); m_addTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly); m_addTabButton->show(); |