Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Oct 14, 2012
2 parents cdb9abd + d06203b commit 2754df0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/app/qgsvectorlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
}
else
{
labelingDialog = 0;
labelDialog = 0;
tabWidget->setTabEnabled( 1, false ); // hide labeling item
tabWidget->setTabEnabled( 2, false ); // hide labeling (deprecated) item
}
Expand Down Expand Up @@ -705,7 +707,8 @@ QgsVectorLayer::EditType QgsVectorLayerProperties::editTypeFromButtonText( QStri

void QgsVectorLayerProperties::apply()
{
labelingDialog->apply();
if ( labelingDialog )
labelingDialog->apply();

//
// Set up sql subset query if applicable
Expand Down Expand Up @@ -749,7 +752,8 @@ void QgsVectorLayerProperties::apply()

actionDialog->apply();

labelDialog->apply();
if ( labelDialog )
labelDialog->apply();
layer->enableLabels( labelCheckBox->isChecked() );
layer->setLayerName( displayName() );

Expand Down
6 changes: 4 additions & 2 deletions src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ QgsPalLayerSettings::QgsPalLayerSettings()
yOffset = 0;
angleOffset = 0;
centroidWhole = false;
//textFont = QFont();
textFont = QApplication::font();
textNamedStyle = QString( "" );
textColor = Qt::black;
textTransp = 0;
Expand Down Expand Up @@ -363,6 +363,8 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
if ( layer->customProperty( "labeling" ).toString() != QString( "pal" ) )
return; // there's no information available

// NOTE: set defaults for newly added properties, for backwards compatibility

fieldName = layer->customProperty( "labeling/fieldName" ).toString();
isExpression = layer->customProperty( "labeling/isExpression" ).toBool();
placement = ( Placement ) layer->customProperty( "labeling/placement" ).toInt();
Expand All @@ -373,7 +375,7 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
yOffset = layer->customProperty( "labeling/yOffset", QVariant( 0.0 ) ).toDouble();
angleOffset = layer->customProperty( "labeling/angleOffset", QVariant( 0.0 ) ).toDouble();
centroidWhole = layer->customProperty( "labeling/centroidWhole", QVariant( false ) ).toBool();
QString fontFamily = layer->customProperty( "labeling/fontFamily" ).toString();
QString fontFamily = layer->customProperty( "labeling/fontFamily", QVariant( QApplication::font().family() ) ).toString();
double fontSize = layer->customProperty( "labeling/fontSize" ).toDouble();
int fontWeight = layer->customProperty( "labeling/fontWeight" ).toInt();
bool fontItalic = layer->customProperty( "labeling/fontItalic" ).toBool();
Expand Down
1 change: 1 addition & 0 deletions src/core/raster/qgsrasteriterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class CORE_EXPORT QgsRasterIterator
@param bandNumber band to read
@param nCols number of columns on output device
@param nRows number of rows on output device
@param block address of block pointer
@param topLeftCol top left column
@param topLeftRow top left row
@return false if the last part was already returned*/
Expand Down
4 changes: 3 additions & 1 deletion src/providers/postgres/qgspostgresconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,9 @@ void QgsPostgresConn::retrieveLayerTypes( QgsPostgresLayerProperty &layerPropert

if ( !layerProperty.schemaName.isEmpty() )
{
table = QString( "%1.%2" ).arg( quotedIdentifier( layerProperty.schemaName ) ).arg( layerProperty.tableName );
table = QString( "%1.%2" )
.arg( quotedIdentifier( layerProperty.schemaName ) )
.arg( quotedIdentifier( layerProperty.tableName ) );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgstilescalewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void QgsTileScaleWidget::showTileScale( QMainWindow *mainWindow )

dock->setWidget( tws );

connect( dock->toggleViewAction(), SIGNAL( triggered( bool ) ), tws, SLOT( scaleEnabled( bool ) ) );
connect( dock, SIGNAL( visibilityChanged( bool ) ), tws, SLOT( scaleEnabled( bool ) ) );

QSettings settings;
dock->setVisible( settings.value( "/UI/tileScaleEnabled", false ).toBool() );
Expand Down

0 comments on commit 2754df0

Please sign in to comment.