4 changes: 2 additions & 2 deletions doc/changelog.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ http://linfiniti.com/2011/08/improvements-to-raster-performance-in-qgis-master/]
- Reduce top and side margins for attribute table dialog
- Remove the (hopefully) last SVN reference
- More svn version removal
- Added missing colour accessor/mutator/member from composerlegenditem header
- Added missing color accessor/mutator/member from composerlegenditem header
- Get rid of svn version stuff from release branch.
- Other workaround for Qt#5114 (fixes #3250, #3028, #2598)
- Try to make the histogram smoother
Expand Down Expand Up @@ -264,7 +264,7 @@ changed so we will just provide a bullet list of key new features here.

- Support for icons of plugins in the plugin manager dialog.
- Removed quickprint plugin - use easyprint plugin rather from plugin repo.
- Removed ogr convertor plugin - use 'save as' context menu rather.
- Removed ogr converter plugin - use 'save as' context menu rather.
-

==Printing==
Expand Down
6 changes: 4 additions & 2 deletions src/app/attributetable/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,8 @@ void QgsAttributeTableDialog::updateExtent()

void QgsAttributeTableDialog::viewWillShowContextMenu( QMenu* menu, QModelIndex atIndex )
{
QModelIndex sourceIndex = mFilterModel->mapToSource( atIndex );

if ( mLayer->actions()->size() != 0 )
{

Expand All @@ -819,12 +821,12 @@ void QgsAttributeTableDialog::viewWillShowContextMenu( QMenu* menu, QModelIndex
if ( !action.runable() )
continue;

QgsAttributeTableAction *a = new QgsAttributeTableAction( action.name(), mView, mModel, i, atIndex );
QgsAttributeTableAction *a = new QgsAttributeTableAction( action.name(), mView, mModel, i, sourceIndex );
menu->addAction( action.name(), a, SLOT( execute() ) );
}
}

QgsAttributeTableAction *a = new QgsAttributeTableAction( tr( "Open form" ), mView, mModel, -1, atIndex );
QgsAttributeTableAction *a = new QgsAttributeTableAction( tr( "Open form" ), mView, mModel, -1, sourceIndex );
menu->addAction( tr( "Open form" ), a, SLOT( featureForm() ) );
}

Expand Down
12 changes: 8 additions & 4 deletions src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,13 @@ void QgsRasterLayerProperties::populateColorMapTable( const QList<QgsColorRampSh
}
void QgsRasterLayerProperties::populateTransparencyTable()
{
//Clear existsing color transparency list
QgsDebugMsg( "entering." );

//Clear existing color transparency list
//NOTE: May want to just tableTransparency->clearContents() and fill back in after checking to be sure list and table are the same size
QString myNumberFormatter;
if ( rbtnThreeBand->isChecked() && QgsRasterLayer::PalettedColor != mRasterLayer->drawingStyle() &&
if ( rbtnThreeBand->isChecked() &&
QgsRasterLayer::PalettedColor != mRasterLayer->drawingStyle() &&
QgsRasterLayer::PalettedMultiBandColor != mRasterLayer->drawingStyle() )
{
for ( int myTableRunner = tableTransparency->rowCount() - 1; myTableRunner >= 0; myTableRunner-- )
Expand Down Expand Up @@ -356,7 +359,7 @@ void QgsRasterLayerProperties::populateTransparencyTable()
}
else
{
//Clear existing single band or pallet values gransparency list
//Clear existing single band or palette values transparency list
for ( int myTableRunner = tableTransparency->rowCount() - 1; myTableRunner >= 0; myTableRunner-- )
{
tableTransparency->removeRow( myTableRunner );
Expand Down Expand Up @@ -394,7 +397,7 @@ void QgsRasterLayerProperties::populateTransparencyTable()
tableTransparency->resizeRowsToContents();
}

/** Set the message indicating if any min max values are estimates */
// Set the message indicating if any min max values are estimates
void QgsRasterLayerProperties::setMinimumMaximumEstimateWarning()
{
bool myEstimatedValues = false;
Expand Down Expand Up @@ -761,6 +764,7 @@ void QgsRasterLayerProperties::sync()
}

QgsDebugMsg( "populate transparency tab" );

/*
* Transparent Pixel Tab
*/
Expand Down
2 changes: 0 additions & 2 deletions src/app/qgsrasterlayerproperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,9 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
void toggleBuildPyramidsButton();

signals:

/** emitted when changes to layer were saved to update legend */
void refreshLegend( QString layerID, bool expandItem );


private:
/** \brief A constant that signals property not used */
const QString TRSTRING_NOT_SET;
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsmaprenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ void QgsMapRenderer::adjustExtentToSize()
dymax = mExtent.yMaximum() + whitespace;
}

QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2\n" ).arg( mapUnitsPerPixelX, 0, 'f', 8 ).arg( mapUnitsPerPixelY, 0, 'f', 8 ) );
QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2\n" ).arg( myWidth, 0, 'f', 8 ).arg( myHeight, 0, 'f', 8 ) );
QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2\n" ).arg( mExtent.width(), 0, 'f', 8 ).arg( mExtent.height(), 0, 'f', 8 ) );
QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2" ).arg( mapUnitsPerPixelX, 0, 'f', 8 ).arg( mapUnitsPerPixelY, 0, 'f', 8 ) );
QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2" ).arg( myWidth, 0, 'f', 8 ).arg( myHeight, 0, 'f', 8 ) );
QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2" ).arg( mExtent.width(), 0, 'f', 8 ).arg( mExtent.height(), 0, 'f', 8 ) );
QgsDebugMsg( mExtent.toString() );

// update extent
Expand Down
37 changes: 21 additions & 16 deletions src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ email : tim at linfiniti.com

#include "qgsapplication.h"
#include "qgslogger.h"
#include "qgsmessagelog.h"
#include "qgsmaplayerregistry.h"
#include "qgsmaptopixel.h"
#include "qgsproviderregistry.h"
Expand Down Expand Up @@ -580,7 +581,7 @@ QString QgsRasterLayer::contrastEnhancementAlgorithmAsString() const
*/
bool QgsRasterLayer::copySymbologySettings( const QgsMapLayer& theOther )
{
//preventwarnings
//prevent warnings
if ( theOther.type() < 0 )
{
return false;
Expand Down Expand Up @@ -988,7 +989,7 @@ QString QgsRasterLayer::drawingStyleAsString() const
*/
bool QgsRasterLayer::hasCompatibleSymbology( const QgsMapLayer& theOther ) const
{
//preventwarnings
//prevent warnings
if ( theOther.type() < 0 )
{
return false;
Expand Down Expand Up @@ -2144,7 +2145,7 @@ QLibrary* QgsRasterLayer::loadProviderLibrary( QString theProviderKey )

if ( !loaded )
{
QgsLogger::warning( "QgsRasterLayer::loadProviderLibrary: Failed to load " );
QgsMessageLog::logMessage( tr( "Failed to load provider %1 (Reason: %2)" ).arg( myLib->fileName() ).arg( myLib->errorString() ), tr( "Raster" ) );
return NULL;
}
QgsDebugMsg( "Loaded data provider library" );
Expand All @@ -2168,7 +2169,7 @@ QgsRasterDataProvider* QgsRasterLayer::loadProvider( QString theProviderKey, QSt

if ( !classFactory )
{
QgsLogger::warning( "QgsRasterLayer::loadProvider: Cannot resolve the classFactory function" );
QgsMessageLog::logMessage( tr( "Cannot resolve the classFactory function" ), tr( "Raster" ) );
return NULL;
}
QgsDebugMsg( "Getting pointer to a mDataProvider object from the library" );
Expand All @@ -2182,7 +2183,7 @@ QgsRasterDataProvider* QgsRasterLayer::loadProvider( QString theProviderKey, QSt

if ( !myDataProvider )
{
QgsLogger::warning( "QgsRasterLayer::loadProvider: Unable to instantiate the data provider plugin" );
QgsMessageLog::logMessage( tr( "Cannot to instantiate the data provider" ), tr( "Raster" ) );
return NULL;
}
QgsDebugMsg( "Data driver created" );
Expand Down Expand Up @@ -2236,9 +2237,16 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
+ QString( " with layer list of " ) + layers.join( ", " )
+ " and style list of " + styles.join( ", " )
+ " and format of " + format + " and CRS of " + crs );
if ( ! mDataProvider->isValid() )
if ( !mDataProvider->isValid() )
{
QgsLogger::warning( "QgsRasterLayer::setDataProvider: Data provider is invalid." );
if ( provider != "gdal" || !layers.isEmpty() || !styles.isEmpty() || !format.isNull() || !crs.isNull() )
{
QgsMessageLog::logMessage( tr( "Data provider is invalid (layers %1, styles %2, formats: %3)" )
.arg( layers.join( ", " ) )
.arg( styles.join( ", " ) )
.arg( format ),
tr( "Raster" ) );
}
return;
}

Expand Down Expand Up @@ -3593,9 +3601,9 @@ bool QgsRasterLayer::writeXml( QDomNode & layer_node,

QDomElement mapLayerNode = layer_node.toElement();

if ( mapLayerNode.isNull() || ( "maplayer" != mapLayerNode.nodeName() ) )
if ( mapLayerNode.isNull() || "maplayer" != mapLayerNode.nodeName() )
{
QgsLogger::warning( "QgsRasterLayer::writeXML() can't find <maplayer>" );
QgsMessageLog::logMessage( tr( "<maplayer> not found." ), tr( "Raster" ) );
return false;
}

Expand Down Expand Up @@ -4488,16 +4496,12 @@ bool QgsRasterLayer::hasBand( QString const & theBandName )
for ( int i = 1; i <= mDataProvider->bandCount(); i++ )
{
QString myColorQString = mDataProvider->colorInterpretationName( i );
#ifdef QGISDEBUG
QgsLogger::debug( "band", i, __FILE__, __FUNCTION__, __LINE__, 2 );
#endif
QgsDebugMsgLevel( QString( "band%1" ).arg( i ), 2 );

if ( myColorQString == theBandName )
{
#ifdef QGISDEBUG
QgsLogger::debug( "band", i, __FILE__, __FUNCTION__, __LINE__, 2 );
QgsDebugMsgLevel( QString( "band%1" ).arg( i ), 2 );
QgsDebugMsgLevel( "Found band : " + theBandName, 2 );
#endif

return true;
}
Expand Down Expand Up @@ -4595,7 +4599,8 @@ double QgsRasterLayer::readValue( void *data, int type, int index )
return ( double )(( double * )data )[index];
break;
default:
QgsLogger::warning( "GDAL data type is not supported" );
QgsMessageLog::logMessage( tr( "GDAL data type %1 is not supported" ).arg( type ), tr( "Raster" ) );
break;
}

return mValidNoDataValue ? mNoDataValue : 0.0;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsexpressionbuilderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
registerItem( tr( "Operators" ), "NOT", " NOT " );


// Load the fuctions from the QgsExpression class
// Load the functions from the QgsExpression class
int count = QgsExpression::functionCount();
for ( int i = 0; i < count; i++ )
{
Expand Down