[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kdepim-3.5.5+/kmail
From:       Allen Winter <winter () kde ! org>
Date:       2006-10-31 21:23:37
Message-ID: 1162329817.944577.18322.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 600801 by winterz:

Custom templates patch from Dmitry: make %CURSOR command really work everywhere.



 M  +6 -1      branches/work/kdepim-3.5.5+/kmail/kmcomposewin.cpp  
 M  +1 -1      branches/work/kdepim-3.5.5+/kmail/kmedit.cpp  


--- branches/work/kdepim-3.5.5+/kmail/kmcomposewin.cpp #600800:600801
@@ -1966,6 +1966,9 @@
     QTimer::singleShot( 200, this, SLOT(slotAppendSignature()) );
   }
   setModified( isModified );
+
+  // do this even for new messages
+  mEditor->setCursorPositionFromStart( (unsigned int) mMsg->getCursorPos() );
 }
 
 
@@ -4061,7 +4064,9 @@
 
     mEditor->update();
     mEditor->setModified( mod );
-    mEditor->setContentsPos( 0, 0 );
+    // interfere with %CURSOR template command
+    // mEditor->setContentsPos( 0, 0 );
+    mEditor->setCursorPositionFromStart( (unsigned int) mMsg->getCursorPos() );
   }
 }
 
--- branches/work/kdepim-3.5.5+/kmail/kmedit.cpp #600800:600801
@@ -732,7 +732,7 @@
   }
 }
 
-void KMEdit::setCursorPositionFromStart(unsigned int pos) {
+void KMEdit::setCursorPositionFromStart( unsigned int pos ) {
   unsigned int l = 0;
   unsigned int c = 0;
   posToRowCol( pos, l, c );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic