From 18cd88a3405b2eb580823c5cbc63c99708a4ff9c Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Date: Thu, 22 Jul 2010 13:33:39 +0200
Subject: [PATCH] QmlDesigner.propertyPane: bugifx

Image.PreserveAspectCrop not PreserveAspectCrop
The scope is needed
---
 .../propertyeditor/contextpanewidgetimage.cpp | 24 +++++++++----------
 .../contextpanewidgetrectangle.cpp            |  3 ---
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp b/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp
index 41bfdb4bfaf..6e598f68fc8 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp
@@ -40,15 +40,15 @@ void ContextPaneWidgetImage::setProperties(QmlJS::PropertyReader *propertyReader
 
         ui->stretchRadioButton->setChecked(true);
 
-        if (fillMode == "Tile")
+        if (fillMode == "Image.Tile" || fillMode == "Tile")
             ui->tileRadioButton->setChecked(true);
-        if (fillMode == "TileVertically")
+        if (fillMode == "Image.TileVertically" || fillMode == "TileVertically")
             ui->horizontalStretchRadioButton->setChecked(true);
-        if (fillMode == "TileHorizontally")
+        if (fillMode == "Image.TileHorizontally" || fillMode == "TileHorizontally")
             ui->verticalStretchRadioButton->setChecked(true);
-        if (fillMode == "PreserveAspectFit")
+        if (fillMode == "Image.PreserveAspectFit" || fillMode == "PreserveAspectFit")
             ui->preserveAspectFitRadioButton->setChecked(true);
-        if (fillMode == "PreserveAspectCrop")
+        if (fillMode == "Image.PreserveAspectCrop" || fillMode == "PreserveAspectCrop")
             ui->cropAspectFitRadioButton->setChecked(true);
     } else {
         ui->stretchRadioButton->setChecked(true);
@@ -76,19 +76,19 @@ void ContextPaneWidgetImage::onStretchChanged()
 {
     QString stretch;
     if (ui->stretchRadioButton->isChecked())
-        stretch = QLatin1String("Stretch");
+        stretch = QLatin1String("Image.Stretch");
     else if (ui->tileRadioButton->isChecked())
-        stretch = QLatin1String("Tile");
+        stretch = QLatin1String("Image.Tile");
     else if (ui->horizontalStretchRadioButton->isChecked())
-        stretch = QLatin1String("TileVertically");
+        stretch = QLatin1String("Image.TileVertically");
     else if (ui->verticalStretchRadioButton->isChecked())
-        stretch = QLatin1String("TileHorizontally");
+        stretch = QLatin1String("Image.TileHorizontally");
     else if (ui->preserveAspectFitRadioButton->isChecked())
-        stretch = QLatin1String("PreserveAspectFit");
+        stretch = QLatin1String("Image.PreserveAspectFit");
     else if (ui->cropAspectFitRadioButton->isChecked())
-        stretch = QLatin1String("PreserveAspectCrop");
+        stretch = QLatin1String("Image.PreserveAspectCrop");
 
-    if (stretch == QLatin1String("Stretch"))
+    if (stretch == QLatin1String("Image.Stretch"))
         emit removeProperty(QLatin1String("fillMode"));
     else
         emit propertyChanged(QLatin1String("fillMode"), stretch);
diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.cpp b/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.cpp
index ff887dd147b..ef622c3b3af 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetrectangle.cpp
@@ -200,9 +200,6 @@ void ContextPaneWidgetRectangle::onGradientLineDoubleClicked(const QPoint &p)
     parentContextWidget->colorDialog()->setupColor(ui->gradientLine->activeColor());
     pos = parentContextWidget->colorDialog()->parentWidget()->mapFromGlobal(pos);
     parentContextWidget->onShowColorDialog(true, pos);
-
-
-
 }
 
 void ContextPaneWidgetRectangle::onUpdateGradient()
-- 
GitLab