From 35229115491c211ef7a9358500fde7aba1cd1214 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Sonderfeld?= <ruediger@c-plusplus.de>
Date: Thu, 18 Feb 2010 16:40:00 +0100
Subject: [PATCH] Reset EnableSpellCheck on switch in case it was autodeactivated by too many errors (might fixes #915).

---
 src/qtui/inputwidget.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp
index ec6e92a..662a5d4 100644
--- a/src/qtui/inputwidget.cpp
+++ b/src/qtui/inputwidget.cpp
@@ -204,6 +204,14 @@ bool InputWidget::eventFilter(QObject *watched, QEvent *event) {
 
 void InputWidget::currentChanged(const QModelIndex &current, const QModelIndex &previous) {
   Q_UNUSED(previous)
+
+#ifdef HAVE_KDE
+    // reset EnableSpellCheck in case it was deactivated by too many errors
+  UiSettings s("InputWidget");
+  s.notify("EnableSpellCheck", this, SLOT(setEnableSpellCheck(QVariant)));
+  setEnableSpellCheck(s.value("EnableSpellCheck", false));
+#endif
+
   NetworkId networkId = current.data(NetworkModel::NetworkIdRole).value<NetworkId>();
   if(networkId == _networkId)
     return;
-- 
1.7.0


