r16111 by jghali - merge trunk revisions up to r16104
scribus-commit
scribus-commit at lists.scribus.net
Sun Dec 19 02:16:00 CET 2010
Author: jghali
Date: Sun Dec 19 01:16:00 2010
New Revision: 16111
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16111
Log:
merge trunk revisions up to r16104
Modified:
branches/ScribusOIF/scribus/text/glyphstore.cpp
branches/ScribusOIF/scribus/text/storytext.cpp
branches/ScribusOIF/scribus/ui/hruler.cpp
Modified: branches/ScribusOIF/scribus/text/glyphstore.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16111&path=/branches/ScribusOIF/scribus/text/glyphstore.cpp
==============================================================================
--- branches/ScribusOIF/scribus/text/glyphstore.cpp (original)
+++ branches/ScribusOIF/scribus/text/glyphstore.cpp Sun Dec 19 01:16:00 2010
@@ -15,6 +15,7 @@
int GlyphStore::clusterOffsetForGlyph(uint glyphIndex) const
{
// return m_clusterOffsets[m_clusterRuns[glyphIndex]];
+ return 0;
}
int GlyphStore::textPosForGlyph(uint i, uint glyphIndex) const
Modified: branches/ScribusOIF/scribus/text/storytext.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16111&path=/branches/ScribusOIF/scribus/text/storytext.cpp
==============================================================================
--- branches/ScribusOIF/scribus/text/storytext.cpp (original)
+++ branches/ScribusOIF/scribus/text/storytext.cpp Sun Dec 19 01:16:00 2010
@@ -267,8 +267,17 @@
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;
}
*/
+ if (selFirst > selLast)
+ {
+ selFirst = 0;
+ selLast = -1;
+ }
invalidate(pos, length());
}
Modified: branches/ScribusOIF/scribus/ui/hruler.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16111&path=/branches/ScribusOIF/scribus/ui/hruler.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/hruler.cpp (original)
+++ branches/ScribusOIF/scribus/ui/hruler.cpp Sun Dec 19 01:16:00 2010
@@ -116,12 +116,12 @@
int Hruler::textPosToLocal(double x) const
{
- return qRound(textPosToCanvas(x) * Scaling);
+ return qRound(textPosToCanvas(x) * Scaling)- currView->contentsX();
}
double Hruler::localToTextPos(int x) const
{
- return x/Scaling - textBase();
+ return ((x + currView->contentsX()) / Scaling - textBase());
}
void Hruler::shift(double pos)
@@ -521,16 +521,18 @@
if (textEditMode)
{
- p.eraseRect(QRect(QPoint(qRound((ItemPos+Extra)*sc), 1), QPoint(qRound((ItemEndPos-RExtra)*sc), 15)));
- p.drawLine(qRound((ItemPos+Extra)*sc), 16, qRound((ItemEndPos-RExtra)*sc), 16);
+ int rectX1 = textPosToLocal(Extra);
+ int rectX2 = textPosToLocal(ItemEndPos-ItemPos-RExtra);
+ p.eraseRect(QRect(QPoint(rectX1, 1), QPoint(rectX2, 15)));
+ p.drawLine(rectX1, 16, rectX2, 16);
p.save();
p.setRenderHints(QPainter::Antialiasing, true);
if (Revers)
{
- p.translate(qRound((ItemPos)*sc), 0);
+ p.translate( textPosToLocal(0), 0);
p.scale(-1, 1);
- p.translate(qRound((ItemPos+Extra)*sc-(ItemEndPos-RExtra)*sc), 0);
- p.translate(-qRound(ItemPos*sc), 0);
+ p.translate( textPosToLocal(Extra) - textPosToLocal(ItemEndPos-ItemPos-RExtra), 0);
+ p.translate(-textPosToLocal(0), 0);
}
for (int CurrCol = 0; CurrCol < Cols; ++CurrCol)
{
More information about the scribus-commit
mailing list