Skip to content

Commit 653abd6

Browse files
author
jef
committed
fix #2013
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11816 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f74ee37 commit 653abd6

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

src/app/qgsuniquevaluedialog.cpp

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVe
7373
//fill the items of the renderer into mValues
7474
for ( QList<QgsSymbol*>::const_iterator iter = list.begin(); iter != list.end(); ++iter )
7575
{
76-
QgsSymbol* symbol = ( *iter );
76+
QgsSymbol* symbol = *iter;
7777
QString symbolvalue = symbol->lowerValue();
7878
QgsSymbol* sym = new QgsSymbol( mVectorLayer->geometryType(), symbol->lowerValue(), symbol->upperValue(), symbol->label() );
7979
sym->setPen( symbol->pen() );
@@ -97,15 +97,15 @@ QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVe
9797

9898
mDeletePushButton->setEnabled( false );
9999

100-
QObject::connect( mClassifyButton, SIGNAL( clicked() ), this, SLOT( changeClassificationAttribute() ) );
101-
QObject::connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addClass() ) );
102-
QObject::connect( mDeletePushButton, SIGNAL( clicked() ), this, SLOT( deleteSelectedClasses() ) );
103-
QObject::connect( mRandomizeColors, SIGNAL( clicked() ), this, SLOT( randomizeColors() ) );
104-
QObject::connect( mResetColors, SIGNAL( clicked() ), this, SLOT( resetColors() ) );
105-
QObject::connect( mClassListWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
106-
QObject::connect( mCommonPropertyLock, SIGNAL( clicked() ), this, SLOT( selectionChanged() ) );
107-
QObject::connect( mClassListWidget, SIGNAL( itemChanged( QListWidgetItem * ) ), this, SLOT( itemChanged( QListWidgetItem * ) ) );
108-
QObject::connect( &sydialog, SIGNAL( settingsChanged() ), this, SLOT( applySymbologyChanges() ) );
100+
connect( mClassifyButton, SIGNAL( clicked() ), this, SLOT( changeClassificationAttribute() ) );
101+
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addClass() ) );
102+
connect( mDeletePushButton, SIGNAL( clicked() ), this, SLOT( deleteSelectedClasses() ) );
103+
connect( mRandomizeColors, SIGNAL( clicked() ), this, SLOT( randomizeColors() ) );
104+
connect( mResetColors, SIGNAL( clicked() ), this, SLOT( resetColors() ) );
105+
connect( mClassListWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
106+
connect( mCommonPropertyLock, SIGNAL( clicked() ), this, SLOT( selectionChanged() ) );
107+
connect( mClassListWidget, SIGNAL( itemChanged( QListWidgetItem * ) ), this, SLOT( itemChanged( QListWidgetItem * ) ) );
108+
connect( &sydialog, SIGNAL( settingsChanged() ), this, SLOT( applySymbologyChanges() ) );
109109
mSymbolWidgetStack->addWidget( &sydialog );
110110
mSymbolWidgetStack->setCurrentWidget( &sydialog );
111111
}
@@ -436,18 +436,21 @@ void QgsUniqueValueDialog::applySymbologyChanges()
436436
}
437437
}
438438

439-
void QgsUniqueValueDialog::updateEntryIcon( QgsSymbol * thepSymbol,
440-
QListWidgetItem * thepItem )
439+
void QgsUniqueValueDialog::updateEntryIcon( QgsSymbol *thepSymbol, QListWidgetItem *thepItem )
441440
{
442441
QGis::GeometryType myType = mVectorLayer->geometryType();
443442
switch ( myType )
444443
{
445444
case QGis::Point:
446-
{
447-
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
448-
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
449-
}
450-
break;
445+
{
446+
double size = thepSymbol->pointSize();
447+
if( size > 50.0 )
448+
thepSymbol->setPointSize( 50.0 );
449+
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( 4.0, false, Qt::yellow, 1.0, 0.0001 ) ) ) );
450+
if( size > 50.0 )
451+
thepSymbol->setPointSize( size );
452+
}
453+
break;
451454
case QGis::Line:
452455
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getLineSymbolAsImage() ) ) );
453456
break;

0 commit comments

Comments
 (0)