Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:qgis/Quantum-GIS

  • Loading branch information
timlinux committed Jul 20, 2012
2 parents 814ea09 + b6380b7 commit ddb972d794d12f132d2c9b245d9db30699d6f00e

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -485,7 +485,16 @@ def addItem(p):
a.setText(2,ver)
a.setToolTip(2,verTip)
a.setText(3,desc)
a.setToolTip(3,descTip)
# split the tooltip into multiple lines when they are too long
tmp = ""
splitTip = ""
for word in descTip.split(" "):
if len(tmp + word) < 80:
tmp = tmp + " " + word
else:
splitTip += tmp + "\n"
tmp = word
a.setToolTip(3, splitTip+tmp)
a.setText(4,p["author"])
if p["homepage"]:
a.setToolTip(4,p["homepage"])
@@ -60,7 +60,7 @@
tr => 'Osman Yilmaz',
uk => 'Сергей Якунин',
vi => 'Bùi Hữu Mạnh',
zh_CN => 'Zhang Jun',
zh_CN => 'Calvin Ngei, Zhang Jun',
zh_TW => 'Nung-yao Lin',
};

@@ -42,8 +42,10 @@ void QgsComposerLabelWidget::on_mTextEdit_textChanged()
if ( mComposerLabel )
{
mComposerLabel->beginCommand( tr( "Label text changed" ), QgsComposerMergeCommand::ComposerLabelSetText );
mComposerLabel->blockSignals( true );
mComposerLabel->setText( mTextEdit->toPlainText() );
mComposerLabel->update();
mComposerLabel->blockSignals( false );
mComposerLabel->endCommand();
}
}
@@ -884,10 +884,16 @@ void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
//Note if the canvas was previously blank so we can
//zoom to all layers at the end if neeeded
bool myFirstLayerFlag = false;
QgsCoordinateReferenceSystem myPreviousCrs;
if ( layers().count() < 1 )
{
myFirstLayerFlag = true;
}
else
{
// remember CRS of present layer
myPreviousCrs = layers().first()->crs();
}

//iteratively add the layers to the canvas
for ( int i = 0; i < theLayerList.size(); ++i )
@@ -956,10 +962,26 @@ void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
mMapCanvas->zoomToFullExtent();
mMapCanvas->clearExtentHistory();
}
else
{
if ( settings.value( "/Projections/otfTransformAutoEnable", true ).toBool() &&
!mMapCanvas->mapRenderer()->hasCrsTransformEnabled() )
{
// Verify if all layers have the same CRS
foreach( QgsMapLayer *l, layers() )
{
if ( myPreviousCrs != l->crs() )
{
// Set to the previous de facto used so that extent does not change
mMapCanvas->mapRenderer()->setDestinationCrs( myPreviousCrs );
mMapCanvas->mapRenderer()->setProjectionsEnabled( true );
break;
}
}
}
}
//make the QTreeWidget item up-to-date
doItemsLayout();


}

//deprecated since 1.8 - delegates to addLayers
@@ -245,6 +245,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
leLayerGlobalCrs->setText( mLayerDefaultCrs.authid() + " - " + mLayerDefaultCrs.description() );

//on the fly CRS transformation settings
chkOtfAuto->setChecked( settings.value( "/Projections/otfTransformAutoEnable", true ).toBool() );
chkOtfTransform->setChecked( settings.value( "/Projections/otfTransformEnabled", 0 ).toBool() );

QString myDefaultCrs = settings.value( "/Projections/projectDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString();
@@ -897,6 +898,7 @@ void QgsOptions::saveOptions()
settings.setValue( "/Projections/layerDefaultCrs", mLayerDefaultCrs.authid() );

// save 'on the fly' CRS transformation settings
settings.setValue( "/Projections/otfTransformAutoEnable", chkOtfAuto->isChecked() );
settings.setValue( "/Projections/otfTransformEnabled", chkOtfTransform->isChecked() );
settings.setValue( "/Projections/projectDefaultCrs", mDefaultCrs.authid() );

@@ -93,7 +93,6 @@ void QgsMSLayerBuilder::clearRasterSymbology( QgsRasterLayer* rl ) const
if ( rl->rasterType() == QgsRasterLayer::GrayOrUndefined )
{
rl->setDrawingStyle( QgsRasterLayer::SingleBandPseudoColor );
rl->setRasterShaderFunction( new QgsRasterShaderFunction() );
}
}
}
@@ -1486,7 +1486,6 @@ void QgsSLDParser::clearRasterSymbology( QgsRasterLayer* rl ) const
if ( rl->rasterType() == QgsRasterLayer::GrayOrUndefined )
{
rl->setDrawingStyle( QgsRasterLayer::SingleBandPseudoColor );
rl->setRasterShaderFunction( new QgsRasterShaderFunction() );
}
}
}
@@ -237,6 +237,7 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem )
QGISEXTERN QDialog * selectWidget( QWidget * parent, Qt::WFlags fl )
{
Q_UNUSED( parent );
Q_UNUSED( fl );
//return new QgsOWSSourceSelect( parent, fl );
return 0;
}
@@ -66,8 +66,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>760</width>
<height>887</height>
<width>766</width>
<height>938</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
@@ -890,8 +890,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>630</width>
<height>625</height>
<width>766</width>
<height>592</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_8">
@@ -1136,9 +1136,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-313</y>
<width>762</width>
<height>750</height>
<y>0</y>
<width>766</width>
<height>718</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_4">
@@ -1507,8 +1507,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>270</width>
<height>93</height>
<width>784</width>
<height>452</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_10">
@@ -1588,8 +1588,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>571</width>
<height>627</height>
<width>766</width>
<height>572</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_13">
@@ -1964,8 +1964,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>425</width>
<height>417</height>
<width>784</width>
<height>452</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_15">
@@ -1984,28 +1984,21 @@
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_22">
<item row="1" column="0">
<item row="3" column="0">
<widget class="QLineEdit" name="leProjectGlobalCrs">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="chkOtfTransform">
<property name="text">
<string>Enable 'on the &amp;fly' reprojection by default</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="3" column="1">
<widget class="QPushButton" name="pbnSelectOtfProjection">
<property name="text">
<string>Select...</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="6" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -2018,7 +2011,7 @@
</property>
</spacer>
</item>
<item row="0" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Always start new projects with this CRS</string>
@@ -2028,6 +2021,26 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="chkOtfAuto">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string>Automatically enable 'on the fly' reprojection if CRS of a new added layer differ from CRS of layer(s) already present. CRS of present layer(s) will be used.</string>
</property>
<property name="text">
<string>Automatically enable 'on the fly' reprojection if layers have different CRS</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="chkOtfTransform">
<property name="text">
<string>Enable 'on the &amp;fly' reprojection by default</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -2138,8 +2151,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>519</width>
<height>584</height>
<width>766</width>
<height>536</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_17">
@@ -2235,8 +2248,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>355</width>
<height>554</height>
<width>766</width>
<height>491</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_20">
@@ -2528,7 +2541,6 @@
<tabstop>scrollArea_6</tabstop>
<tabstop>pbnSelectOtfProjection</tabstop>
<tabstop>leProjectGlobalCrs</tabstop>
<tabstop>chkOtfTransform</tabstop>
<tabstop>radPromptForProjection</tabstop>
<tabstop>radUseProjectProjection</tabstop>
<tabstop>radUseGlobalProjection</tabstop>
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit ddb972d

Please sign in to comment.
You can’t perform that action at this time.