"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gui/vectortile/qgsvectortilebasicrendererwidget.cpp" between
QGIS-final-3_14_15.tar.gz and QGIS-final-3_14_16.tar.gz

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

qgsvectortilebasicrendererwidget.cpp  (QGIS-final-3_14_15):qgsvectortilebasicrendererwidget.cpp  (QGIS-final-3_14_16)
skipping to change at line 360 skipping to change at line 360
viewStyles->selectionModel()->setCurrentIndex( mModel->index( rows, 0 ), QItem SelectionModel::ClearAndSelect ); viewStyles->selectionModel()->setCurrentIndex( mModel->index( rows, 0 ), QItem SelectionModel::ClearAndSelect );
} }
void QgsVectorTileBasicRendererWidget::editStyle() void QgsVectorTileBasicRendererWidget::editStyle()
{ {
editStyleAtIndex( viewStyles->selectionModel()->currentIndex() ); editStyleAtIndex( viewStyles->selectionModel()->currentIndex() );
} }
void QgsVectorTileBasicRendererWidget::editStyleAtIndex( const QModelIndex &inde x ) void QgsVectorTileBasicRendererWidget::editStyleAtIndex( const QModelIndex &inde x )
{ {
if ( index.row() < 0 || index.row() >= mRenderer->styles().count() )
return;
QgsVectorTileBasicRendererStyle style = mRenderer->style( index.row() ); QgsVectorTileBasicRendererStyle style = mRenderer->style( index.row() );
if ( !style.symbol() ) if ( !style.symbol() )
return; return;
std::unique_ptr< QgsSymbol > symbol( style.symbol()->clone() ); std::unique_ptr< QgsSymbol > symbol( style.symbol()->clone() );
QgsSymbolWidgetContext context; QgsSymbolWidgetContext context;
context.setMapCanvas( mMapCanvas ); context.setMapCanvas( mMapCanvas );
context.setMessageBar( mMessageBar ); context.setMessageBar( mMessageBar );
skipping to change at line 401 skipping to change at line 404
style.setSymbol( symbol.release() ); style.setSymbol( symbol.release() );
mRenderer->setStyle( index.row(), style ); mRenderer->setStyle( index.row(), style );
emit widgetChanged(); emit widgetChanged();
} }
} }
void QgsVectorTileBasicRendererWidget::updateSymbolsFromWidget() void QgsVectorTileBasicRendererWidget::updateSymbolsFromWidget()
{ {
int index = viewStyles->selectionModel()->currentIndex().row(); int index = viewStyles->selectionModel()->currentIndex().row();
if ( index < 0 )
return;
QgsVectorTileBasicRendererStyle style = mRenderer->style( index ); QgsVectorTileBasicRendererStyle style = mRenderer->style( index );
QgsSymbolSelectorWidget *dlg = qobject_cast<QgsSymbolSelectorWidget *>( sender () ); QgsSymbolSelectorWidget *dlg = qobject_cast<QgsSymbolSelectorWidget *>( sender () );
style.setSymbol( dlg->symbol()->clone() ); style.setSymbol( dlg->symbol()->clone() );
mRenderer->setStyle( index, style ); mRenderer->setStyle( index, style );
emit widgetChanged(); emit widgetChanged();
} }
void QgsVectorTileBasicRendererWidget::cleanUpSymbolSelector( QgsPanelWidget *co ntainer ) void QgsVectorTileBasicRendererWidget::cleanUpSymbolSelector( QgsPanelWidget *co ntainer )
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added

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