Skip to content

Commit ebdd1ad

Browse files
committed
Merge branch 'master' of https://github.com/qgis/Quantum-GIS into coloramp
2 parents 69c3774 + eaecf0c commit ebdd1ad

File tree

66 files changed

+3786
-2147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3786
-2147
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo
289289
IF(MSVC)
290290
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DQGISDEBUG=1")
291291
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQGISDEBUG=1")
292+
# disable macros that offend std::numeric_limits<T>::min()/max()
293+
ADD_DEFINITIONS(-DNOMINMAX)
292294
ENDIF(MSVC)
293295

294296
#############################################################

python/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ INCLUDE_DIRECTORIES(
3939
${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
4040
)
4141

42-
43-
# In Windef.h there are min() and max() macros that interfere with the usage
44-
# of std::numeric_limits<T>::min() and :max() in qgsrasterbands.h.
45-
IF(MSVC)
46-
ADD_DEFINITIONS(-DNOMINMAX)
47-
ENDIF(MSVC)
48-
4942
IF(PYQT4_VERSION_NUM LESS 263680) # 0x040600
5043
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY)
5144
ENDIF(PYQT4_VERSION_NUM LESS 263680)

python/core/qgscomposermultiframe.sip

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ public:
99
enum ResizeMode
1010
{
1111
UseExistingFrames = 0,
12-
ExtendToNextPage //duplicates last frame to next page to fit the total size
12+
ExtendToNextPage, //uses the next page(s) until the content has been printed
13+
RepeatOnEveryPage, //repeats the same frame on every page
14+
RepeatUntilFinished //duplicates last frame to next page to fit the total size
1315
};
1416

1517
QgsComposerMultiFrame( QgsComposition* c, bool createUndoCommands );
@@ -41,4 +43,4 @@ public:
4143
void deleteFrames();
4244

4345
int nFrames() const;
44-
};
46+
};

python/core/qgsrastertransparency.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public:
2121

2222
struct TransparentSingleValuePixel
2323
{
24-
double pixelValue;
24+
double min;
25+
double max;
2526
double percentTransparent;
2627
};
2728

scripts/spelling.dat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,4 @@ writeable:writable
456456
vaild:valid
457457
opps:oops
458458
arount:around
459+
acheive:achieve

src/app/composer/qgscomposerhtmlwidget.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ QgsComposerHtmlWidget::QgsComposerHtmlWidget( QgsComposerHtml* html, QgsComposer
1313
blockSignals( true );
1414
mResizeModeComboBox->addItem( tr( "Use existing frames" ), QgsComposerMultiFrame::UseExistingFrames );
1515
mResizeModeComboBox->addItem( tr( "Extend to next page" ), QgsComposerMultiFrame::ExtendToNextPage );
16+
mResizeModeComboBox->addItem( tr( "Repeat on every page" ), QgsComposerMultiFrame::RepeatOnEveryPage );
17+
mResizeModeComboBox->addItem( tr( "Repeat until finished" ), QgsComposerMultiFrame::RepeatUntilFinished );
1618
blockSignals( false );
1719
setGuiElementValues();
1820

src/app/qgisapp.cpp

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
#include "qgsrasteriterator.h"
164164
#include "qgsrasterlayer.h"
165165
#include "qgsrasterlayerproperties.h"
166+
#include "qgsrasternuller.h"
166167
#include "qgsrasterrenderer.h"
167168
#include "qgsrasterlayersaveasdialog.h"
168169
#include "qgsrectangle.h"
@@ -1395,8 +1396,8 @@ void QgisApp::createStatusBar()
13951396
mCoordsEdit->setWhatsThis( tr( "Shows the map coordinates at the "
13961397
"current cursor position. The display is continuously updated "
13971398
"as the mouse is moved. It also allows editing to set the canvas "
1398-
"center to a given position." ) );
1399-
mCoordsEdit->setToolTip( tr( "Current map coordinate (formatted as x,y)" ) );
1399+
"center to a given position. The format is lat,lon or east,north" ) );
1400+
mCoordsEdit->setToolTip( tr( "Current map coordinate (lat,lon or east,north)" ) );
14001401
statusBar()->addPermanentWidget( mCoordsEdit, 0 );
14011402
connect( mCoordsEdit, SIGNAL( editingFinished() ), this, SLOT( userCenter() ) );
14021403

@@ -2409,7 +2410,7 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS
24092410

24102411
}
24112412

2412-
// make sure at least one layer was succesfully added
2413+
// make sure at least one layer was successfully added
24132414
if ( myList.count() == 0 )
24142415
{
24152416
return false;
@@ -3924,7 +3925,7 @@ void QgisApp::saveAsRasterFile()
39243925
return;
39253926
}
39263927

3927-
QgsRasterLayerSaveAsDialog d( rasterLayer->dataProvider(), mMapCanvas->extent(), mMapCanvas->mapRenderer()->destinationCrs() );
3928+
QgsRasterLayerSaveAsDialog d( rasterLayer, rasterLayer->dataProvider(), mMapCanvas->extent(), rasterLayer->crs(), mMapCanvas->mapRenderer()->destinationCrs() );
39283929
if ( d.exec() == QDialog::Accepted )
39293930
{
39303931
QgsRasterFileWriter fileWriter( d.outputFileName() );
@@ -3953,12 +3954,21 @@ void QgisApp::saveAsRasterFile()
39533954
QgsDebugMsg( "Cannot set pipe provider" );
39543955
return;
39553956
}
3957+
3958+
QgsRasterNuller *nuller = new QgsRasterNuller();
3959+
nuller->setNoData( d.noData() );
3960+
if ( !pipe->insert( 1, nuller ) )
3961+
{
3962+
QgsDebugMsg( "Cannot set pipe nuller" );
3963+
return;
3964+
}
3965+
39563966
// add projector if necessary
3957-
if ( d.outputCrs() != rasterLayer->dataProvider()->crs() )
3967+
if ( d.outputCrs() != rasterLayer->crs() )
39583968
{
39593969
QgsRasterProjector * projector = new QgsRasterProjector;
3960-
projector->setCRS( rasterLayer->dataProvider()->crs(), d.outputCrs() );
3961-
if ( !pipe->set( projector ) )
3970+
projector->setCRS( rasterLayer->crs(), d.outputCrs() );
3971+
if ( !pipe->insert( 2, projector ) )
39623972
{
39633973
QgsDebugMsg( "Cannot set pipe projector" );
39643974
return;
@@ -3977,18 +3987,17 @@ void QgisApp::saveAsRasterFile()
39773987
delete pipe;
39783988
return;
39793989
}
3980-
projector->setCRS( rasterLayer->dataProvider()->crs(), d.outputCrs() );
3990+
projector->setCRS( rasterLayer->crs(), d.outputCrs() );
39813991
}
39823992

39833993
if ( !pipe->last() )
39843994
{
39853995
delete pipe;
39863996
return;
39873997
}
3988-
QgsRasterIterator iterator( pipe->last() );
39893998
fileWriter.setCreateOptions( d.createOptions() );
39903999

3991-
fileWriter.writeRaster( &iterator, d.nColumns(), d.nRows(), d.outputRectangle(), d.outputCrs(), &pd );
4000+
fileWriter.writeRaster( pipe, d.nColumns(), d.nRows(), d.outputRectangle(), d.outputCrs(), &pd );
39924001
delete pipe;
39934002
}
39944003
}
@@ -7361,7 +7370,7 @@ bool QgisApp::addRasterLayers( QStringList const &theFileNameQStringList, bool g
73617370
else
73627371
{
73637372
// Issue message box warning unless we are loading from cmd line since
7364-
// non-rasters are passed to this function first and then sucessfully
7373+
// non-rasters are passed to this function first and then successfully
73657374
// loaded afterwards (see main.cpp)
73667375

73677376
if ( guiWarning )

src/app/qgsattributetabledialog.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ void QgsAttributeTableDialog::columnBoxInit()
264264
QgsFieldMap fieldMap = mLayer->pendingFields();
265265
QgsFieldMap::Iterator it = fieldMap.begin();
266266

267+
mColumnBox->clear();
268+
267269
for ( ; it != fieldMap.end(); ++it )
268270
if ( mLayer->editType( it.key() ) != QgsVectorLayer::Hidden )
269271
mColumnBox->addItem( it.value().name() );
@@ -706,6 +708,7 @@ void QgsAttributeTableDialog::on_mAddAttribute_clicked()
706708
}
707709
// update model - a field has been added or updated
708710
mModel->reload( mModel->index( 0, 0 ), mModel->index( mModel->rowCount() - 1, mModel->columnCount() - 1 ) );
711+
columnBoxInit();
709712
}
710713
}
711714

@@ -747,6 +750,7 @@ void QgsAttributeTableDialog::on_mRemoveAttribute_clicked()
747750
}
748751
// update model - a field has been added or updated
749752
mModel->reload( mModel->index( 0, 0 ), mModel->index( mModel->rowCount() - 1, mModel->columnCount() - 1 ) );
753+
columnBoxInit();
750754
}
751755
}
752756

@@ -760,6 +764,7 @@ void QgsAttributeTableDialog::on_mOpenFieldCalculator_clicked()
760764
if ( col >= 0 )
761765
{
762766
mModel->reload( mModel->index( 0, col ), mModel->index( mModel->rowCount() - 1, col ) );
767+
columnBoxInit();
763768
}
764769
}
765770
}

0 commit comments

Comments
 (0)