r17323 by jghali - #10593: Scribus freezes up on column width adjust.

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 22 20:52:29 UTC 2012


Author: jghali
Date: Wed Feb 22 20:52:28 2012
New Revision: 17323

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17323
Log:
#10593: Scribus freezes up on column width adjust.

Modified:
    branches/Version14x/Scribus/scribus/propertiespalette.cpp

Modified: branches/Version14x/Scribus/scribus/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17323&path=/branches/Version14x/Scribus/scribus/propertiespalette.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/propertiespalette.cpp (original)
+++ branches/Version14x/Scribus/scribus/propertiespalette.cpp Wed Feb 22 20:52:28 2012
@@ -2090,13 +2090,15 @@
 		if (colgapLabel->currentIndex() == 0)
 		{
 			dGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
-			dGap->setValue(i2->ColGap*m_unitRatio);
+			dGap->setValue(i2->ColGap * m_unitRatio);
 		}
 		else
 		{
 			dGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
-			dGap->setValue(i2->columnWidth()*m_unitRatio);
-		}
+			dGap->setValue(i2->columnWidth() * m_unitRatio);
+		}
+		colgapLabel->setEnabled(DCol->value() > 1);
+		dGap->setEnabled(DCol->value() > 1);
 		DLeft->setValue(i2->textToFrameDistLeft()*m_unitRatio);
 		DTop->setValue(i2->textToFrameDistTop()*m_unitRatio);
 		DBottom->setValue(i2->textToFrameDistBottom()*m_unitRatio);
@@ -2926,17 +2928,19 @@
 			if (colgapLabel->currentIndex() == 0)
 			{
 				dGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
-				dGap->setValue(i2->ColGap*m_unitRatio);
+				dGap->setValue(i2->ColGap * m_unitRatio);
 			}
 			else
 			{
-				dGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
-				dGap->setValue(i2->columnWidth()*m_unitRatio);
+				dGap->setMaximum(qMax((i2->width() / i2->Cols) *m_unitRatio, 0.0));
+				dGap->setValue(i2->columnWidth() * m_unitRatio);
 			}
 		}
 	}
 	DCol->setMinimum(1);
 	dGap->setMinimum(0);
+	colgapLabel->setEnabled(DCol->value() > 1);
+	dGap->setEnabled(DCol->value() > 1);
 	HaveItem = tmp;
 }
 
@@ -3925,7 +3929,7 @@
 		return;
 	if (colgapLabel->currentIndex() == 0)
 		CurItem->ColGap = dGap->value() / m_unitRatio;
-	else
+	else if (CurItem->Cols > 1)
 	{
 		double lineCorr;
 		if (CurItem->lineColor() != CommonStrings::None)




More information about the scribus-commit mailing list