r15757 by craig - fwd port changes for #1562

scribus-commit scribus-commit at lists.scribus.net
Wed Nov 3 23:02:47 CET 2010


Author: craig
Date: Wed Nov  3 22:02:47 2010
New Revision: 15757

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15757
Log:
fwd port changes for #1562

Modified:
    branches/ScribusOIF/scribus/canvasmode_legacy.cpp
    branches/ScribusOIF/scribus/canvasmode_normal.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp

Modified: branches/ScribusOIF/scribus/canvasmode_legacy.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15757&path=/branches/ScribusOIF/scribus/canvasmode_legacy.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_legacy.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_legacy.cpp Wed Nov  3 22:02:47 2010
@@ -285,7 +285,7 @@
 	{
 		if (currItem->asLatexFrame()) 
 		{
-			if ((currItem->locked()) || (!currItem->ScaleType))
+			if (currItem->locked())// || (!currItem->ScaleType))
 			{
 				return;
 			}
@@ -294,7 +294,7 @@
 		} 
 		else if ((currItem->itemType() == PageItem::Polygon) || (currItem->itemType() == PageItem::PolyLine) || (currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::PathText))
 		{
-			if ((currItem->locked()) || (!currItem->ScaleType))
+			if (currItem->locked())// || (!currItem->ScaleType))
 			{
 				//				mousePressEvent(m);
 				return;

Modified: branches/ScribusOIF/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15757&path=/branches/ScribusOIF/scribus/canvasmode_normal.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_normal.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_normal.cpp Wed Nov  3 22:02:47 2010
@@ -174,7 +174,7 @@
 	{
 		if (currItem->asLatexFrame()) 
 		{
-			if ((currItem->locked()) || (!currItem->ScaleType))
+			if (currItem->locked()) // || (!currItem->ScaleType))
 			{
 				return;
 			}
@@ -189,7 +189,7 @@
 #endif
 		else if ((currItem->itemType() == PageItem::Polygon) || (currItem->itemType() == PageItem::PolyLine) || (currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::PathText))
 		{
-			if ((currItem->locked()) || (!currItem->ScaleType))
+			if (currItem->locked()) //|| (!currItem->ScaleType))
 			{
 				//mousePressEvent(m);
 				return;

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15757&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Wed Nov  3 22:02:47 2010
@@ -6558,9 +6558,9 @@
 		return;
 	if (OrigW == 0 || OrigH == 0)
 		return;
-	LocalX = 0;
-	LocalY = 0;
-	LocalRot = 0;
+//	LocalX = 0;
+//	LocalY = 0;
+//	LocalRot = 0;
 	double xs = Width / static_cast<double>(OrigW);
 	double ys = Height / static_cast<double>(OrigH);
 	if (AspectRatio)
@@ -6886,7 +6886,7 @@
 {
 	if (m_ItemType!=PageItem::ImageFrame)
 		return;
-	if ((locked()) || (!ScaleType))
+	if (locked())// || (!ScaleType))
 		return;
 	double dX=0.0, dY=0.0;
 	if (imageFlippedH())

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15757&path=/branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp Wed Nov  3 22:02:47 2010
@@ -94,9 +94,9 @@
 	imagePageNumberSelector->addWidget( imagePageNumber, 0, 1);
 	pageLayout_4->addLayout( imagePageNumberSelector );
 	
-	FreeScale = new QRadioButton( "&Free Scaling", this );
-	FreeScale->setChecked( true );
-	pageLayout_4->addWidget( FreeScale );
+//	FreeScale = new QRadioButton( "&Free Scaling", this );
+//	FreeScale->setChecked( true );
+//	pageLayout_4->addWidget( FreeScale );
 
 	layout43 = new QGridLayout;
 	layout43->setSpacing( 5 );
@@ -121,42 +121,46 @@
 	imageRotationLabel->setBuddy(imageRotation);
 	layout43->addWidget( imageRotationLabel, 2, 0 );
 	layout43->addWidget( imageRotation, 2, 1 );
+
+	FreeScale = new QRadioButton( "&Free Scaling", this );
+	FreeScale->setChecked( true );
+	layout43->addWidget( FreeScale );
 	
 	imageXScaleSpinBox = new ScrSpinBox( this, 0 );
 	installSniffer(imageXScaleSpinBox);
 	xscaleLabel = new QLabel( "X-Sc&ale:", this );
 	xscaleLabel->setBuddy(imageXScaleSpinBox);
-	layout43->addWidget( xscaleLabel, 3, 0 );
-	layout43->addWidget( imageXScaleSpinBox, 3, 1 );
+	layout43->addWidget( xscaleLabel, 4, 0 );
+	layout43->addWidget( imageXScaleSpinBox, 4, 1 );
 	imageYScaleSpinBox = new ScrSpinBox( this, 0 );
 	installSniffer(imageYScaleSpinBox);
 	yscaleLabel = new QLabel( "Y-Scal&e:", this );
 	yscaleLabel->setBuddy(imageYScaleSpinBox);
-	layout43->addWidget( yscaleLabel, 4, 0 );
-	layout43->addWidget( imageYScaleSpinBox, 4, 1 );
+	layout43->addWidget( yscaleLabel, 5, 0 );
+	layout43->addWidget( imageYScaleSpinBox, 5, 1 );
 	keepImageWHRatioButton = new LinkButton( this );
 	keepImageWHRatioButton->setCheckable( true );
 	keepImageWHRatioButton->setAutoRaise( true );
 	keepImageWHRatioButton->setMaximumSize( QSize( 15, 32767 ) );
-	layout43->addWidget( keepImageWHRatioButton, 3, 2, 2, 1 );
+	layout43->addWidget( keepImageWHRatioButton, 4, 2, 2, 1 );
 
 	imgDpiX = new ScrSpinBox( this, 0 );
 	installSniffer(imgDpiX);
 	imgDPIXLabel = new QLabel( "Actual X-DPI:", this );
 	imgDPIXLabel->setBuddy(imgDpiX);
-	layout43->addWidget( imgDPIXLabel, 5, 0 );
-	layout43->addWidget( imgDpiX, 5, 1 );
+	layout43->addWidget( imgDPIXLabel, 6, 0 );
+	layout43->addWidget( imgDpiX, 6, 1 );
 	imgDpiY = new ScrSpinBox( this, 0 );
 	installSniffer(imgDpiY);
 	imgDPIYLabel = new QLabel( "Actual Y-DPI:", this );
 	imgDPIYLabel->setBuddy(imgDpiY);
-	layout43->addWidget( imgDPIYLabel, 6, 0 );
-	layout43->addWidget( imgDpiY, 6, 1 );
+	layout43->addWidget( imgDPIYLabel, 7, 0 );
+	layout43->addWidget( imgDpiY, 7, 1 );
 	keepImageDPIRatioButton = new LinkButton( this );
 	keepImageDPIRatioButton->setCheckable( true );
 	keepImageDPIRatioButton->setAutoRaise( true );
 	keepImageDPIRatioButton->setMaximumSize( QSize( 15, 32767 ) );
-	layout43->addWidget( keepImageDPIRatioButton, 5, 2, 2, 1 );
+	layout43->addWidget( keepImageDPIRatioButton, 6, 2, 2, 1 );
 	pageLayout_4->addLayout( layout43 );
 
 	Layout24 = new QVBoxLayout;
@@ -609,9 +613,9 @@
 // 			keepImageWHRatioButton->setChecked(setter);
 // 			keepImageDPIRatioButton->setChecked(setter);
 // 		}
-		imageXOffsetSpinBox->setEnabled(setter);
-		imageYOffsetSpinBox->setEnabled(setter);
-		imageRotation->setEnabled(setter);
+		//imageXOffsetSpinBox->setEnabled(setter);
+		//imageYOffsetSpinBox->setEnabled(setter);
+		//imageRotation->setEnabled(setter);
 
 		imageXScaleSpinBox->blockSignals(false);
 		imageYScaleSpinBox->blockSignals(false);
@@ -683,32 +687,38 @@
 {
 	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
+
 	if (FreeScale == sender())
 	{
 		FrameScale->setChecked(false);
 		FreeScale->setChecked(true);
 		Aspect->setEnabled(false);
-		imageXOffsetSpinBox->setEnabled(true);
-		imageYOffsetSpinBox->setEnabled(true);
+//		imageXOffsetSpinBox->setEnabled(true);
+//		imageYOffsetSpinBox->setEnabled(true);
 		imageXScaleSpinBox->setEnabled(true);
 		imageYScaleSpinBox->setEnabled(true);
 		imgDpiX->setEnabled(true);
 		imgDpiY->setEnabled(true);
-		imageRotation->setEnabled(true);
+//		imageRotation->setEnabled(true);
+		keepImageWHRatioButton->setEnabled(true);
+		keepImageDPIRatioButton->setEnabled(true);
 	}
 	if (FrameScale == sender())
 	{
 		FrameScale->setChecked(true);
 		FreeScale->setChecked(false);
 		Aspect->setEnabled(true);
-		imageXOffsetSpinBox->setEnabled(false);
-		imageYOffsetSpinBox->setEnabled(false);
+//		imageXOffsetSpinBox->setEnabled(false);
+//		imageYOffsetSpinBox->setEnabled(false);
 		imageXScaleSpinBox->setEnabled(false);
 		imageYScaleSpinBox->setEnabled(false);
 		imgDpiX->setEnabled(false);
 		imgDpiY->setEnabled(false);
-		imageRotation->setEnabled(false);
-	}
+//		imageRotation->setEnabled(false);
+		keepImageWHRatioButton->setEnabled(false);
+		keepImageDPIRatioButton->setEnabled(false);
+	}
+
 	if ((m_haveDoc) && (m_haveItem))
 	{
 		m_item->setImageScalingMode(FreeScale->isChecked(), Aspect->isChecked());




More information about the scribus-commit mailing list