@@ -52,12 +52,6 @@ QgsUniqueValueDialog::QgsUniqueValueDialog(QgsVectorLayer* vl): QDialog(), mVect
52
52
return ;
53
53
}
54
54
55
- QObject::connect (mClassificationComboBox , SIGNAL (activated (int )), this , SLOT (changeClassificationAttribute (int )));
56
- QObject::connect (mClassBreakBox , SIGNAL (selectionChanged ()), this , SLOT (changeCurrentValue ()));
57
- QObject::connect (&sydialog, SIGNAL (settingsChanged ()), this , SLOT (applySymbologyChanges ()));
58
- mSymbolWidgetStack ->addWidget (&sydialog);
59
- mSymbolWidgetStack ->raiseWidget (&sydialog);
60
-
61
55
const QgsUniqueValueRenderer* renderer = dynamic_cast < const QgsUniqueValueRenderer * >(mVectorLayer ->renderer ());
62
56
63
57
if (renderer)
@@ -66,11 +60,6 @@ QgsUniqueValueDialog::QgsUniqueValueDialog(QgsVectorLayer* vl): QDialog(), mVect
66
60
std::list<int >::iterator iter=renderer->classificationAttributes ().begin ();
67
61
int classattr=*iter;
68
62
mClassificationComboBox ->setCurrentItem (classattr);
69
-
70
- if (renderer->symbols ().size ()>0 )
71
- {
72
- changeClassificationAttribute (classattr);
73
- }
74
63
75
64
const std::list<QgsSymbol*> list = renderer->symbols ();
76
65
// fill the items of the renderer into mValues
@@ -83,7 +72,6 @@ QgsUniqueValueDialog::QgsUniqueValueDialog(QgsVectorLayer* vl): QDialog(), mVect
83
72
sym->setBrush (symbol->brush ());
84
73
sym->setNamedPointSymbol (symbol->pointSymbolName ());
85
74
sym->setPointSize (symbol->pointSize ());
86
-
87
75
mValues .insert (std::make_pair (symbolvalue,sym));
88
76
mClassBreakBox ->insertItem (symbolvalue);
89
77
}
@@ -92,6 +80,13 @@ QgsUniqueValueDialog::QgsUniqueValueDialog(QgsVectorLayer* vl): QDialog(), mVect
92
80
{
93
81
changeClassificationAttribute (0 );
94
82
}
83
+
84
+ QObject::connect (mClassificationComboBox , SIGNAL (activated (int )), this , SLOT (changeClassificationAttribute (int )));
85
+ QObject::connect (mClassBreakBox , SIGNAL (selectionChanged ()), this , SLOT (changeCurrentValue ()));
86
+ QObject::connect (&sydialog, SIGNAL (settingsChanged ()), this , SLOT (applySymbologyChanges ()));
87
+ mSymbolWidgetStack ->addWidget (&sydialog);
88
+ mSymbolWidgetStack ->raiseWidget (&sydialog);
89
+
95
90
mClassBreakBox ->setCurrentItem (0 );
96
91
}
97
92
@@ -118,9 +113,6 @@ void QgsUniqueValueDialog::apply()
118
113
for (std::map<QString,QgsSymbol*>::iterator it=mValues .begin ();it!=mValues .end ();++it)
119
114
{
120
115
QgsSymbol* symbol=it->second ;
121
- #ifdef QGISDEBUG
122
- qWarning (" apply: lower value is " +symbol->lowerValue ());
123
- #endif
124
116
QgsSymbol* newsymbol=new QgsSymbol (mVectorLayer ->vectorType (), symbol->lowerValue (), symbol->upperValue (), symbol->label ());
125
117
newsymbol->setPen (symbol->pen ());
126
118
newsymbol->setBrush (symbol->brush ());
0 commit comments