Bug 107032 - Inserting characters in subject line moves cursor to EOL
Summary: Inserting characters in subject line moves cursor to EOL
Status: RESOLVED FIXED
Alias: None
Product: knode
Classification: Unmaintained
Component: general (show other bugs)
Version: 0.9.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-08 14:05 UTC by Andreas Schallenberg
Modified: 2005-06-18 17:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schallenberg 2005-06-08 14:05:31 UTC
Version:           0.9.1 (using KDE 3.4.1 Level "a" , SUSE 9.2 UNSUPPORTED)
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809)
OS:                Linux (i686) release 2.6.8-24.14-default

To reproduce:

Start Kontact, select Knode, begin creating a new message.
Place cursor in subject line and type "ab". Use cursor left
key to move cursor between the two characters.
Type "cd". Subject line now reads "acbd" and not "acdb".
Comment 1 Volker Krause 2005-06-18 16:54:06 UTC
SVN commit 426778 by vkrause:

Fix regression of my fix for #104788: Don't change cursor position in
subject field.

CCBUG: 107032


 M  +2 -1      kncomposer.cpp  


--- trunk/KDE/kdepim/knode/kncomposer.cpp #426777:426778
@@ -1427,7 +1427,8 @@
   QString subject = t;
   subject.replace( '\n', ' ' );
   subject.replace( '\r', ' ' );
-  v_iew->s_ubject->setText( subject );
+  if ( subject != t ) // setText() sets the cursor to the end
+    v_iew->s_ubject->setText( subject );
   // update caption
   if( !subject.isEmpty() )
     setCaption( subject );
Comment 2 Volker Krause 2005-06-18 17:01:28 UTC
SVN commit 426781 by vkrause:

Backport from trunk for KDE 3.4.2:
Fix regression of my fix for #104788: Don't change cursor position in
subject field.

BUG: 107032


 M  +2 -1      kncomposer.cpp  


--- branches/KDE/3.4/kdepim/knode/kncomposer.cpp #426780:426781
@@ -1427,7 +1427,8 @@
   QString subject = t;
   subject.replace( '\n', ' ' );
   subject.replace( '\r', ' ' );
-  v_iew->s_ubject->setText( subject );
+  if ( subject != t ) // setText() sets the cursor to the end
+    v_iew->s_ubject->setText( subject );
   // update caption
   if( !subject.isEmpty() )
     setCaption( subject );