Skip to content

Commit 613ef63

Browse files
committed
Remove last use of QgsSizeScaleWidget
1 parent 8567719 commit 613ef63

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/gui/symbology-ng/qgsrendererwidget.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,6 @@ QgsDataDefinedValueDialog::QgsDataDefinedValueDialog( const QList<QgsSymbol*>& s
292292
void QgsDataDefinedValueDialog::setContext( const QgsSymbolWidgetContext& context )
293293
{
294294
mContext = context;
295-
#if 0
296-
Q_FOREACH ( QgsPropertyOverrideButton* ddButton, findChildren<QgsPropertyOverrideButton*>() )
297-
{
298-
299-
if ( ddButton->assistant() )
300-
ddButton->assistant()->setMapCanvas( context.mapCanvas() );
301-
}
302-
#endif
303295
}
304296

305297
QgsSymbolWidgetContext QgsDataDefinedValueDialog::context() const

src/gui/symbology-ng/qgsrendererwidget.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ class QgsField;
137137
class QgsFields;
138138

139139
#include "ui_widget_set_dd_value.h"
140-
#include "qgssizescalewidget.h"
141140
#include "qgis_gui.h"
142141

143142
/** \ingroup gui
@@ -212,10 +211,11 @@ class GUI_EXPORT QgsDataDefinedSizeDialog : public QgsDataDefinedValueDialog
212211
: QgsDataDefinedValueDialog( symbolList, layer, tr( "Size" ) )
213212
{
214213
init( QgsSymbolLayer::PropertySize );
215-
#if 0
216214
if ( !symbolList.isEmpty() && symbolList.at( 0 ) && vectorLayer() )
217-
mDDBtn->setAssistant( tr( "Size Assistant..." ), new QgsSizeScaleWidget( vectorLayer(), static_cast<const QgsMarkerSymbol*>( symbolList.at( 0 ) ) ) );
218-
#endif
215+
{
216+
mAssistantSymbol.reset( static_cast<const QgsMarkerSymbol*>( symbolList.at( 0 ) )->clone() );
217+
mDDBtn->setSymbol( mAssistantSymbol );
218+
}
219219
}
220220

221221
protected:
@@ -224,6 +224,10 @@ class GUI_EXPORT QgsDataDefinedSizeDialog : public QgsDataDefinedValueDialog
224224
double value( const QgsSymbol * symbol ) const override { return static_cast<const QgsMarkerSymbol*>( symbol )->size(); }
225225

226226
void setDataDefined( QgsSymbol* symbol, const QgsProperty& dd ) override;
227+
228+
private:
229+
230+
std::shared_ptr< QgsMarkerSymbol > mAssistantSymbol;
227231
};
228232

229233
/** \ingroup gui

0 commit comments

Comments
 (0)