[QGIS Commit] r11229 - in trunk/qgis/src: app ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Jul 31 15:36:56 EDT 2009


Author: jef
Date: 2009-07-31 15:36:55 -0400 (Fri, 31 Jul 2009)
New Revision: 11229

Modified:
   trunk/qgis/src/app/qgsuniquevaluedialog.cpp
   trunk/qgis/src/ui/qgsuniquevaluedialogbase.ui
Log:
[FEATURE] make restriction to change only common properties of unique value classes optional (fixes #1703)

Modified: trunk/qgis/src/app/qgsuniquevaluedialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsuniquevaluedialog.cpp	2009-07-31 17:15:15 UTC (rev 11228)
+++ trunk/qgis/src/app/qgsuniquevaluedialog.cpp	2009-07-31 19:36:55 UTC (rev 11229)
@@ -102,6 +102,7 @@
   QObject::connect( mRandomizeColors, SIGNAL( clicked() ), this, SLOT( randomizeColors() ) );
   QObject::connect( mResetColors, SIGNAL( clicked() ), this, SLOT( resetColors() ) );
   QObject::connect( mClassListWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
+  QObject::connect( mCommonPropertyLock, SIGNAL( clicked() ), this, SLOT( selectionChanged() ) );
   QObject::connect( mClassListWidget, SIGNAL( itemChanged( QListWidgetItem * ) ), this, SLOT( itemChanged( QListWidgetItem * ) ) );
   QObject::connect( &sydialog, SIGNAL( settingsChanged() ), this, SLOT( applySymbologyChanges() ) );
   mSymbolWidgetStack->addWidget( &sydialog );
@@ -348,7 +349,7 @@
   {
     mDeletePushButton->setEnabled( true );
 
-    if ( selection.size() == 1 )
+    if ( selection.size() == 1 || !mCommonPropertyLock->isChecked() )
     {
       QListWidgetItem *item = selection[0];
       if ( !item )
@@ -361,7 +362,7 @@
       sydialog.set( symbol );
       sydialog.setLabel( symbol->label() );
     }
-    else if ( selection.size() > 1 )
+    else if ( selection.size() > 1 && mCommonPropertyLock->isChecked() )
     {
       if ( !mValues.contains( selection[0]->text() ) )
         return;

Modified: trunk/qgis/src/ui/qgsuniquevaluedialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsuniquevaluedialogbase.ui	2009-07-31 17:15:15 UTC (rev 11228)
+++ trunk/qgis/src/ui/qgsuniquevaluedialogbase.ui	2009-07-31 19:36:55 UTC (rev 11229)
@@ -124,7 +124,7 @@
      </item>
     </layout>
    </item>
-   <item row="2" column="0" >
+   <item row="2" column="0" rowspan="2" >
     <widget class="QListWidget" name="mClassListWidget" >
      <property name="sizePolicy" >
       <sizepolicy vsizetype="Expanding" hsizetype="Minimum" >
@@ -146,6 +146,16 @@
      <widget class="QWidget" name="page_2" />
     </widget>
    </item>
+   <item row="3" column="1">
+    <widget class="QCheckBox" name="mCommonPropertyLock">
+     <property name="text">
+      <string>Restrict changes to common properties</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11" />



More information about the QGIS-commit mailing list