r16104 by jghali - #9592, crash with sequential cutting of text : fix SE part
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 18 21:57:57 CET 2010
Author: jghali
Date: Sat Dec 18 20:57:57 2010
New Revision: 16104
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16104
Log:
#9592, crash with sequential cutting of text : fix SE part
Modified:
trunk/Scribus/scribus/text/storytext.cpp
Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16104&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp (original)
+++ trunk/Scribus/scribus/text/storytext.cpp Sat Dec 18 20:57:57 2010
@@ -307,9 +307,18 @@
d->takeAt(i);
d->len--;
delete it;
+ // #9592 : adjust selFirst and selLast, those values have to be
+ // consistent in functions such as select()
+ if (i <= selLast) --selLast;
+ if (i < selFirst) --selFirst;
}
d->len = d->count();
+ if (selFirst > selLast)
+ {
+ selFirst = 0;
+ selLast = -1;
+ }
invalidate(pos, length());
}
More information about the scribus-commit
mailing list