Skip to content

Commit bf616cb

Browse files
author
jef
committed
[FEATURE] make restriction to change only common properties of unique value classes optional (fixes #1703)
git-svn-id: http://svn.osgeo.org/qgis/trunk@11229 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b49980c commit bf616cb

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/app/qgsuniquevaluedialog.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVe
102102
QObject::connect( mRandomizeColors, SIGNAL( clicked() ), this, SLOT( randomizeColors() ) );
103103
QObject::connect( mResetColors, SIGNAL( clicked() ), this, SLOT( resetColors() ) );
104104
QObject::connect( mClassListWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
105+
QObject::connect( mCommonPropertyLock, SIGNAL( clicked() ), this, SLOT( selectionChanged() ) );
105106
QObject::connect( mClassListWidget, SIGNAL( itemChanged( QListWidgetItem * ) ), this, SLOT( itemChanged( QListWidgetItem * ) ) );
106107
QObject::connect( &sydialog, SIGNAL( settingsChanged() ), this, SLOT( applySymbologyChanges() ) );
107108
mSymbolWidgetStack->addWidget( &sydialog );
@@ -348,7 +349,7 @@ void QgsUniqueValueDialog::selectionChanged()
348349
{
349350
mDeletePushButton->setEnabled( true );
350351

351-
if ( selection.size() == 1 )
352+
if ( selection.size() == 1 || !mCommonPropertyLock->isChecked() )
352353
{
353354
QListWidgetItem *item = selection[0];
354355
if ( !item )
@@ -361,7 +362,7 @@ void QgsUniqueValueDialog::selectionChanged()
361362
sydialog.set( symbol );
362363
sydialog.setLabel( symbol->label() );
363364
}
364-
else if ( selection.size() > 1 )
365+
else if ( selection.size() > 1 && mCommonPropertyLock->isChecked() )
365366
{
366367
if ( !mValues.contains( selection[0]->text() ) )
367368
return;

src/ui/qgsuniquevaluedialogbase.ui

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
</item>
125125
</layout>
126126
</item>
127-
<item row="2" column="0" >
127+
<item row="2" column="0" rowspan="2" >
128128
<widget class="QListWidget" name="mClassListWidget" >
129129
<property name="sizePolicy" >
130130
<sizepolicy vsizetype="Expanding" hsizetype="Minimum" >
@@ -146,6 +146,16 @@
146146
<widget class="QWidget" name="page_2" />
147147
</widget>
148148
</item>
149+
<item row="3" column="1">
150+
<widget class="QCheckBox" name="mCommonPropertyLock">
151+
<property name="text">
152+
<string>Restrict changes to common properties</string>
153+
</property>
154+
<property name="checked">
155+
<bool>true</bool>
156+
</property>
157+
</widget>
158+
</item>
149159
</layout>
150160
</widget>
151161
<layoutdefault spacing="6" margin="11" />

0 commit comments

Comments
 (0)