r18695 by jghali - #11909, #11915: Editing flipped text frames from canvas behave as no flipped ones

scribus-commit scribus-commit at lists.scribus.net
Tue Jan 7 20:38:58 UTC 2014


Author: jghali
Date: Tue Jan  7 20:38:58 2014
New Revision: 18695

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18695
Log:
#11909, #11915: Editing flipped text frames from canvas behave as no flipped ones

Modified:
    branches/Version14x/Scribus/scribus/canvasmode_edit.cpp
    branches/Version14x/Scribus/scribus/scribusview.cpp

Modified: branches/Version14x/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18695&path=/branches/Version14x/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/canvasmode_edit.cpp (original)
+++ branches/Version14x/Scribus/scribus/canvasmode_edit.cpp Tue Jan  7 20:38:58 2014
@@ -315,15 +315,17 @@
 			cPen.setColor ( ScColorEngine::getRGBColor ( m_doc->PageColors[textframe->itemText.charStyle ( textCursorPos ).fillColor() ], m_doc ) );
 		}
 		//handle Right to Left writing
-		if ( textframe->reversed() )
-		{
-			dx=textframe->width()-dx;
+		if (textframe->imageFlippedH())
+			dx = textframe->width() - dx;
+		if (textframe->imageFlippedV())
+		{
+			dy  = textframe->height() - dy;
+			dy1 = textframe->height() - dy1;
 		}
 
 		p->save();
 		p->translate ( textframe->xPos(), textframe->yPos() );
 		p->rotate ( textframe->rotation() );
-
 
 		p->setPen ( cPen );
 		p->setRenderHint ( QPainter::Antialiasing, true );

Modified: branches/Version14x/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18695&path=/branches/Version14x/Scribus/scribus/scribusview.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusview.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusview.cpp Tue Jan  7 20:38:58 2014
@@ -1715,8 +1715,10 @@
 				transform.inverted().map(pf.x(), pf.y(), &tx, &ty);
 				point.setXY(tx, ty);
 			}
-			if (currItem->reversed())
+			if (currItem->imageFlippedH())
 				point.setX(currItem->width() - point.x());
+			if (currItem->imageFlippedV())
+				point.setY(currItem->height() - point.y());
 			currItem->itemText.setCursorPosition( currItem->itemText.length() == 0 ? 0 :
 				currItem->itemText.screenToPosition(point) );
 




More information about the scribus-commit mailing list