r16103 by jghali - #9592, crash with sequential cutting of text : fix SE part
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 18 21:54:58 CET 2010
Author: jghali
Date: Sat Dec 18 20:54:58 2010
New Revision: 16103
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16103
Log:
#9592, crash with sequential cutting of text : fix SE part
Modified:
branches/Version135/Scribus/scribus/text/storytext.cpp
Modified: branches/Version135/Scribus/scribus/text/storytext.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16103&path=/branches/Version135/Scribus/scribus/text/storytext.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/text/storytext.cpp (original)
+++ branches/Version135/Scribus/scribus/text/storytext.cpp Sat Dec 18 20:54:58 2010
@@ -308,9 +308,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