Bug 132230

Summary: selected text is deselected on channel activity
Product: [Applications] konversation Reporter: Niek Beernink <n.beernink>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Niek Beernink 2006-08-10 23:09:01 UTC
Version:           0.19+ #3119 (using KDE KDE 3.5.4)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 4.1.2 20060715 (prerelease) (Ubuntu 4.1.1-9ubuntu1) 
OS:                Linux

How to reproduce:

1. Select some text.
2. Wait for channel activity (people talking, joining/leaving).
3. Notice the text being deselected.

Expected behavior:

Text remains selected on channel activity.
Comment 1 Eike Hein 2006-08-10 23:41:24 UTC
*** Bug 132231 has been marked as a duplicate of this bug. ***
Comment 2 Peter Simonsson 2007-01-26 17:56:18 UTC
Fixed in trunk, rev 627452. Will be in 1.1
Comment 3 argonel 2007-07-08 20:21:54 UTC
SVN commit 685395 by argonel:

silence unnecessary qWarning emanating from the bowels of qtextedit

CCBUG:132230



 M  +1 -1      commit.h  
 M  +3 -4      ircview.cpp  


--- branches/extragear/kde3/network/konversation/src/commit.h #685394:685395
@@ -1,4 +1,4 @@
 // This COMMIT number is added to version string to be used as "patch level"
 #ifndef COMMIT
-#define COMMIT 3209
+#define COMMIT 3210
 #endif
--- branches/extragear/kde3/network/konversation/src/ircview.cpp #685394:685395
@@ -981,9 +981,10 @@
     // at an end, so the scrollbar wets its pants and forgets who it is for ten minutes
     if (doScroll)
     {
-        int sbm = Preferences::scrollbackMax();
+        int sbm = Preferences::scrollbackMax(); //note: reused below
+        int numRemoved = paragraphs() - sbm;
 
-        if(sbm)
+        if(numRemoved >0)
         {
             //Explanation: the scrolling mechanism cannot handle the buffer changing when the scrollbar is not
             // at an end, so the scrollbar wets its pants and forgets who it is for ten minutes
@@ -991,8 +992,6 @@
             {
                 int paraFrom, indexFrom, paraTo, indexTo;
                 getSelection(&paraFrom, &indexFrom, &paraTo, &indexTo); // Remember the selection so we don't loose it when removing lines
-                int numRemoved = paragraphs() - sbm;
-
                 for (sbm = numRemoved; sbm > 0; --sbm)
                 {
                     removeParagraph(0);