From 5b0f37abd5d1ecaef1a30a6eb38666f39b15c7b1 Mon Sep 17 00:00:00 2001 From: nowrep Date: Sun, 17 Feb 2013 11:41:42 +0100 Subject: [PATCH] Fixed crash when showing multiple notifications with Tabs On Top. --- CHANGELOG | 1 + src/lib/webview/webtab.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ad274473b..d58f1bba2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ Version 1.4.0 * added support for FTP listing files and downloading * added support for saving passwords of multiple users per site * added support for showing tabs on top + * possibility to select text on page with Shift+Arrow keys * asking user whether to allow site to use notifications/geolocation * option to set JavaScript privacy permissions * option to specify default search engine used in locationbar diff --git a/src/lib/webview/webtab.cpp b/src/lib/webview/webtab.cpp index ba30d3784..8ff08b91b 100644 --- a/src/lib/webview/webtab.cpp +++ b/src/lib/webview/webtab.cpp @@ -301,13 +301,13 @@ QPixmap WebTab::renderTabPreview() void WebTab::showNotification(QWidget* notif) { - const int notifPos = m_navigationContainer ? 2 : 1; + const int notifPos = qzSettings->tabsOnTop ? 1 : 0; - if (m_layout->count() > notifPos) { - delete m_layout->itemAt(0)->widget(); + if (m_layout->count() > notifPos + 1) { + delete m_layout->itemAt(notifPos)->widget(); } - m_layout->insertWidget(notifPos - 1, notif); + m_layout->insertWidget(notifPos, notif); notif->show(); }