Ticket #6351: fix

File fix, 1.4 KB (added by Matthias "mortalmatt" Dahl <devel@…>, 15 years ago)

Fix MythUITextEdit::keyPressEvent()

Line 
1Index: mythtv/libs/libmythui/mythuitextedit.cpp
2===================================================================
3--- mythtv/libs/libmythui/mythuitextedit.cpp    (revision 20207)
4+++ mythtv/libs/libmythui/mythuitextedit.cpp    (working copy)
5@@ -371,21 +371,19 @@
6         {
7             RemoveCharacter();
8         }
9-        else if (action == "SELECT")
10+        else if (action == "SELECT"
11+                 && GetMythDB()->GetNumSetting("UseVirtualKeyboard", 1) == 1)
12         {
13-            if (GetMythDB()->GetNumSetting("UseVirtualKeyboard", 1) == 1)
14-            {
15-                MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
16-                MythUIVirtualKeyboard *kb =  new MythUIVirtualKeyboard(popupStack, this);
17+            MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
18+            MythUIVirtualKeyboard *kb =  new MythUIVirtualKeyboard(popupStack, this);
19 
20-                if (kb->Create())
21-                {
22-                    //connect(kb, SIGNAL(keyPress(QString)), SLOT(keyPress(QString)));
23-                    popupStack->AddScreen(kb);
24-                }
25-                else
26-                    delete kb;
27+            if (kb->Create())
28+            {
29+                //connect(kb, SIGNAL(keyPress(QString)), SLOT(keyPress(QString)));
30+                popupStack->AddScreen(kb);
31             }
32+            else
33+                delete kb;
34         }
35         else
36             handled = false;