summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-06-19 17:37:01 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-06-19 17:48:38 +0200
commit85205e6368da2ee46cfe46b64f71a5c6beecab80 (patch)
treec1baf9dfb9b8d934d971410b5af2b045a0c1f20b /src
parentSVN_SILENT made messages (.desktop file) (diff)
downloadrekonq-85205e6368da2ee46cfe46b64f71a5c6beecab80.tar.xz
Fix and improve save zoom feature, loading it on start
This seems to work also with problem described in bug #295446 BUG: 277599 BUG: 296447 CCBUG: 295446
Diffstat (limited to 'src')
-rw-r--r--src/webpage.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index efddba81..559d3eae 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -449,21 +449,22 @@ void WebPage::loadStarted()
{
_hasAdBlockedElements = false;
rApp->adblockManager()->clearElementsLists();
-}
-
-
-void WebPage::loadFinished(bool ok)
-{
- Q_UNUSED(ok);
// set zoom factor
QString val;
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group(config, "Zoom");
val = group.readEntry(_loadingUrl.host(), QString("10"));
-
+
int value = val.toInt();
- mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values
+ if (value != 10)
+ mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values
+}
+
+
+void WebPage::loadFinished(bool ok)
+{
+ Q_UNUSED(ok);
// Provide site icon. Can this be moved to loadStarted??
rApp->iconManager()->provideIcon(mainFrame(), _loadingUrl);