r20288 by craig - #13266: Fix image scaling frame options not enabling/disabling correctly in prefs

scribus-commit scribus-commit at lists.scribus.net
Tue Jul 28 16:28:44 UTC 2015


Author: craig
Date: Tue Jul 28 16:28:44 2015
New Revision: 20288

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20288
Log:
#13266: Fix image scaling frame options not enabling/disabling correctly in prefs

Modified:
    trunk/Scribus/scribus/ui/prefs_itemtools.cpp
    trunk/Scribus/scribus/ui/prefs_itemtools.h

Modified: trunk/Scribus/scribus/ui/prefs_itemtools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20288&path=/trunk/Scribus/scribus/ui/prefs_itemtools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_itemtools.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_itemtools.cpp Tue Jul 28 16:28:44 2015
@@ -203,7 +203,7 @@
 	arcDisplay->restoreDefaults(&prefsData->itemToolPrefs);
 	// Spiral Tool
 	spiralDisplay->restoreDefaults(&prefsData->itemToolPrefs);
-
+	imageScalingTypeChange();
 	enableSignals(true);
 }
 
@@ -336,13 +336,12 @@
 		connect(textFrameFillColorComboBox, SIGNAL(activated(int)), this, SLOT(updateFontPreview()));
 		connect(textFrameFillShadingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateFontPreview()));
 		connect(textColorShadingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateFontPreview()));
-//		connect(buttonGroup3, SIGNAL(toggled(bool)), this, SLOT(changeImageScalingFree(bool)));
-//		connect(buttonGroup5, SIGNAL(toggled(bool)), this, SLOT(changeImageScalingRatio(bool)));
 		connect(scalingLockToolButton, SIGNAL(clicked()), this, SLOT(toggleImagesScalingChain()));
 		connect(imageHorizontalScalingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(imageHorizontalScalingChange()));
 		connect(imageKeepAspectRatioCheckBox, SIGNAL(toggled(bool)), scalingLockToolButton, SLOT(setChecked(bool)));
 		connect(imageVerticalScalingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(imageVerticalScalingChange()));
-//		connect(tabFillCombo, SIGNAL(activated(int)), this, SLOT(setFillChar(int)));
+		connect(imageFreeScalingRadioButton, SIGNAL(clicked(bool)), this, SLOT(imageScalingTypeChange()));
+		connect(imageFrameScalingRadioButton, SIGNAL(clicked(bool)), this, SLOT(imageScalingTypeChange()));
 	}
 	else
 	{
@@ -352,12 +351,9 @@
 		disconnect(textFrameFillColorComboBox, SIGNAL(activated(int)), this, SLOT(updateFontPreview()));
 		disconnect(textFrameFillShadingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateFontPreview()));
 		disconnect(textColorShadingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateFontPreview()));
-//		disconnect(buttonGroup3, SIGNAL(toggled(bool)), this, SLOT(changeImageScalingFree(bool)));
-//		disconnect(buttonGroup5, SIGNAL(toggled(bool)), this, SLOT(changeImageScalingRatio(bool)));
 		disconnect(scalingLockToolButton, SIGNAL(clicked()), this, SLOT(toggleImagesScalingChain()));
 		disconnect(imageHorizontalScalingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(imageHorizontalScalingChange()));
 		disconnect(imageVerticalScalingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(imageVerticalScalingChange()));
-//		disconnect(tabFillCombo, SIGNAL(activated(int)), this, SLOT(setFillChar(int)));
 	}
 }
 
@@ -430,4 +426,13 @@
 		imageHorizontalScalingSpinBox->setValue(imageVerticalScalingSpinBox->value());
 }
 
-
+void Prefs_ItemTools::imageScalingTypeChange()
+{
+	bool b=imageFreeScalingRadioButton->isChecked();
+	imageKeepAspectRatioCheckBox->setEnabled(!b);
+	imageHorizontalScalingSpinBox->setEnabled(b);
+	imageVerticalScalingSpinBox->setEnabled(b);
+	scalingLockToolButton->setEnabled(b);
+}
+
+

Modified: trunk/Scribus/scribus/ui/prefs_itemtools.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20288&path=/trunk/Scribus/scribus/ui/prefs_itemtools.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_itemtools.h (original)
+++ trunk/Scribus/scribus/ui/prefs_itemtools.h Tue Jul 28 16:28:44 2015
@@ -35,6 +35,7 @@
 		void toggleImagesScalingChain();
 		void imageHorizontalScalingChange();
 		void imageVerticalScalingChange();
+		void imageScalingTypeChange();
 
 	protected:
 		ScribusDoc* m_doc;




More information about the scribus-commit mailing list