[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/utils/krep
From: Thorsten Staerk <dev () staerk ! de>
Date: 2007-06-30 19:29:18
Message-ID: 1183231758.977637.16450.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 681912 by tstaerk:
as good as possible, keep the cursor position after filtering
M +7 -0 krep.cpp
--- trunk/playground/utils/krep/krep.cpp #681911:681912
@@ -46,7 +46,13 @@
}
void krep::slotbuttonclicked()
+// This procedure is called when the "filter" button is clicked.
+// It start filterthreads to filter the content of the lower widget by the regexs
+// in the upper widget.
+// ToDo: what if QTextCursor points to a line that is now out of bounds ?
+// ToDo: if 10 lines above filtered away, how can we move t up by 10 lines ?
{
+ QTextCursor t=mkrep->ktextedit_2->textCursor();
QList<QString> chaffs=chaff.split("\n");
int linecount=chaffs.count();
@@ -56,6 +62,7 @@
f2->start();
while (!f1->isFinished() || !f2->isFinished()) ;
mkrep->ktextedit_2->setText(f1->result()+f2->result());
+ mkrep->ktextedit_2->setTextCursor(t);
}
void krep::slotfilechanged()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic