"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gui/symbology/qgssinglesymbolrendererwidget.cpp" between
QGIS-final-3_10_5.tar.gz and QGIS-final-3_10_6.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Long-term release (3.10.x series).

qgssinglesymbolrendererwidget.cpp  (QGIS-final-3_10_5):qgssinglesymbolrendererwidget.cpp  (QGIS-final-3_10_6)
skipping to change at line 49 skipping to change at line 49
// (null renderer means "no previous renderer") // (null renderer means "no previous renderer")
if ( renderer ) if ( renderer )
{ {
mRenderer = QgsSingleSymbolRenderer::convertFromRenderer( renderer ); mRenderer = QgsSingleSymbolRenderer::convertFromRenderer( renderer );
} }
if ( !mRenderer ) if ( !mRenderer )
{ {
QgsSymbol *symbol = QgsSymbol::defaultSymbol( mLayer->geometryType() ); QgsSymbol *symbol = QgsSymbol::defaultSymbol( mLayer->geometryType() );
mRenderer = new QgsSingleSymbolRenderer( symbol ); if ( symbol )
mRenderer = new QgsSingleSymbolRenderer( symbol );
} }
// load symbol from it // load symbol from it
mSingleSymbol = mRenderer->symbol()->clone(); if ( mRenderer )
mSingleSymbol = mRenderer->symbol()->clone();
// setup ui // setup ui
mSelector = new QgsSymbolSelectorWidget( mSingleSymbol, mStyle, mLayer, nullpt r ); mSelector = new QgsSymbolSelectorWidget( mSingleSymbol, mStyle, mLayer, nullpt r );
connect( mSelector, &QgsSymbolSelectorWidget::symbolModified, this, &QgsSingle SymbolRendererWidget::changeSingleSymbol ); connect( mSelector, &QgsSymbolSelectorWidget::symbolModified, this, &QgsSingle SymbolRendererWidget::changeSingleSymbol );
connect( mSelector, &QgsPanelWidget::showPanel, this, &QgsPanelWidget::openPan el ); connect( mSelector, &QgsPanelWidget::showPanel, this, &QgsPanelWidget::openPan el );
connect( this, &QgsRendererWidget::symbolLevelsChanged, [ = ]() connect( this, &QgsRendererWidget::symbolLevelsChanged, [ = ]()
{ {
delete mSingleSymbol; delete mSingleSymbol;
mSingleSymbol = mRenderer->symbol()->clone(); mSingleSymbol = mRenderer->symbol()->clone();
mSelector->loadSymbol( mSingleSymbol ); mSelector->loadSymbol( mSingleSymbol );
skipping to change at line 75 skipping to change at line 77
QVBoxLayout *layout = new QVBoxLayout( this ); QVBoxLayout *layout = new QVBoxLayout( this );
layout->setContentsMargins( 0, 0, 0, 0 ); layout->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( mSelector ); layout->addWidget( mSelector );
// advanced actions - data defined rendering // advanced actions - data defined rendering
QMenu *advMenu = mSelector->advancedMenu(); QMenu *advMenu = mSelector->advancedMenu();
QAction *actionLevels = advMenu->addAction( tr( "Symbol Levels…" ) ); QAction *actionLevels = advMenu->addAction( tr( "Symbol Levels…" ) );
connect( actionLevels, &QAction::triggered, this, &QgsSingleSymbolRendererWidg et::showSymbolLevels ); connect( actionLevels, &QAction::triggered, this, &QgsSingleSymbolRendererWidg et::showSymbolLevels );
if ( mSingleSymbol->type() == QgsSymbol::Marker ) if ( mSingleSymbol && mSingleSymbol->type() == QgsSymbol::Marker )
{ {
QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined Size Legend …" ) ); QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined Size Legend …" ) );
// only from Qt 5.6 there is convenience addAction() with new style connecti on // only from Qt 5.6 there is convenience addAction() with new style connecti on
connect( actionDdsLegend, &QAction::triggered, this, &QgsSingleSymbolRendere rWidget::dataDefinedSizeLegend ); connect( actionDdsLegend, &QAction::triggered, this, &QgsSingleSymbolRendere rWidget::dataDefinedSizeLegend );
} }
} }
QgsSingleSymbolRendererWidget::~QgsSingleSymbolRendererWidget() QgsSingleSymbolRendererWidget::~QgsSingleSymbolRendererWidget()
{ {
delete mSingleSymbol; delete mSingleSymbol;
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)