Skip to content

Commit

Permalink
Remove last use of QgsSizeScaleWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 14, 2017
1 parent 8567719 commit 613ef63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/gui/symbology-ng/qgsrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,6 @@ QgsDataDefinedValueDialog::QgsDataDefinedValueDialog( const QList<QgsSymbol*>& s
void QgsDataDefinedValueDialog::setContext( const QgsSymbolWidgetContext& context )
{
mContext = context;
#if 0
Q_FOREACH ( QgsPropertyOverrideButton* ddButton, findChildren<QgsPropertyOverrideButton*>() )
{

if ( ddButton->assistant() )
ddButton->assistant()->setMapCanvas( context.mapCanvas() );
}
#endif
}

QgsSymbolWidgetContext QgsDataDefinedValueDialog::context() const
Expand Down
12 changes: 8 additions & 4 deletions src/gui/symbology-ng/qgsrendererwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class QgsField;
class QgsFields;

#include "ui_widget_set_dd_value.h"
#include "qgssizescalewidget.h"
#include "qgis_gui.h"

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

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

void setDataDefined( QgsSymbol* symbol, const QgsProperty& dd ) override;

private:

std::shared_ptr< QgsMarkerSymbol > mAssistantSymbol;
};

/** \ingroup gui
Expand Down

0 comments on commit 613ef63

Please sign in to comment.