Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set the use of symbology ng and anti aliasing to default for qgis 1.7
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15259 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Feb 24, 2011
1 parent 9ee7e95 commit ef37b2f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -2375,7 +2375,8 @@ void QgisApp::createOverview()

// moved here to set anti aliasing to both map canvas and overview
QSettings mySettings;
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", false ).toBool() );
// Anti Aliasing enabled by default as of QGIS 1.7
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", false ).toBool() );

int action = mySettings.value( "/qgis/wheel_action", 0 ).toInt();
Expand Down
6 changes: 4 additions & 2 deletions src/app/qgsoptions.cpp
Expand Up @@ -260,10 +260,12 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
cmbTheme->setCurrentIndex( cmbTheme->findText( settings.value( "/Themes", "default" ).toString() ) );
cmbSize->setCurrentIndex( cmbSize->findText( settings.value( "/IconSize", 24 ).toString() ) );
//set the state of the checkboxes
chkAntiAliasing->setChecked( settings.value( "/qgis/enable_anti_aliasing", false ).toBool() );
//Changed to default to true as of QGIS 1.7
chkAntiAliasing->setChecked( settings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
chkUseRenderCaching->setChecked( settings.value( "/qgis/enable_render_caching", false ).toBool() );

chkUseSymbologyNG->setChecked( settings.value( "/qgis/use_symbology_ng", false ).toBool() );
//Changed to default to true as of QGIS 1.7
chkUseSymbologyNG->setChecked( settings.value( "/qgis/use_symbology_ng", true ).toBool() );

// Slightly awkard here at the settings value is true to use QImage,
// but the checkbox is true to use QPixmap
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposermap.cpp
Expand Up @@ -150,7 +150,8 @@ void QgsComposerMap::draw( QPainter *painter, const QgsRectangle& extent, const

//set antialiasing if enabled in options
QSettings settings;
if ( settings.value( "/qgis/enable_anti_aliasing", false ).toBool() )
// Changed to enable anti aliased rendering by default as of QGIS 1.7
if ( settings.value( "/qgis/enable_anti_aliasing", true ).toBool() )
{
painter->setRenderHint( QPainter::Antialiasing );
}
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsmaprenderer.cpp
Expand Up @@ -459,7 +459,8 @@ void QgsMapRenderer::render( QPainter* painter )
mypImage->fill( 0 );
ml->setCacheImage( mypImage ); //no need to delete the old one, maplayer does it for you
QPainter * mypPainter = new QPainter( ml->cacheImage() );
if ( mySettings.value( "/qgis/enable_anti_aliasing", false ).toBool() )
// Changed to enable anti aliasing by default in QGIS 1.7
if ( mySettings.value( "/qgis/enable_anti_aliasing", true ).toBool() )
{
mypPainter->setRenderHint( QPainter::Antialiasing );
}
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -127,7 +127,8 @@ QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath,
setCoordinateSystem();

QSettings settings;
if ( settings.value( "/qgis/use_symbology_ng", false ).toBool() && hasGeometryType() )
//Changed to default to true as of QGIS 1.7
if ( settings.value( "/qgis/use_symbology_ng", true ).toBool() && hasGeometryType() )
{
// using symbology-ng!
setUsingRendererV2( true );
Expand Down

0 comments on commit ef37b2f

Please sign in to comment.