Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Dec 5, 2011
2 parents f9f4860 + d38a0bc commit 5b6b293
Show file tree
Hide file tree
Showing 7 changed files with 7,217 additions and 4,766 deletions.
3,040 changes: 2,027 additions & 1,013 deletions i18n/qgis_fr.ts

Large diffs are not rendered by default.

8,822 changes: 5,135 additions & 3,687 deletions i18n/qgis_mn.ts

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/app/legend/qgslayerorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ QgsLayerOrder::QgsLayerOrder( QgsLegend *legend, QWidget * parent, const char *n
connect( mLegend, SIGNAL( zOrderChanged() ),
this, SLOT( refreshLayerList() ) );

connect( mLegend, SIGNAL( invisibleLayerRemoved() ),
this, SLOT( refreshLayerList() ) );

connect( mLegend->canvas(), SIGNAL( layersChanged() ),
this, SLOT( refreshLayerList() ) );

Expand Down
10 changes: 9 additions & 1 deletion src/app/legend/qgslegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ void QgsLegend::removeLayer( QString layerId )
{
QgsDebugMsg( "Entering." );

bool invLayerRemoved = false;

for ( QTreeWidgetItem* theItem = firstItem(); theItem; theItem = nextItem( theItem ) )
{
QgsLegendItem *li = dynamic_cast<QgsLegendItem *>( theItem );
Expand All @@ -254,15 +256,21 @@ void QgsLegend::removeLayer( QString layerId )

if ( ll && ll->layer() && ll->layer()->id() == layerId )
{
if( !ll->isVisible() )
{
invLayerRemoved = true;
}
removeItem( ll );
delete ll;
break;
}
}
}

updateMapCanvasLayerSet();
adjustIconSize();

if( invLayerRemoved )
emit invisibleLayerRemoved();
}

void QgsLegend::mousePressEvent( QMouseEvent * e )
Expand Down
1 change: 1 addition & 0 deletions src/app/legend/qgslegend.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ class QgsLegend : public QTreeWidget
void itemMoved( QModelIndex oldIndex, QModelIndex newIndex );

void zOrderChanged();
void invisibleLayerRemoved();

void updateDrawingOrderChecked( bool );
void updateDrawingOrderUnchecked( bool );
Expand Down
8 changes: 5 additions & 3 deletions src/gui/qgsnewvectorlayerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ QgsNewVectorLayerDialog::QgsNewVectorLayerDialog( QWidget *parent, Qt::WFlags fl
srs.validate();

mCrsId = srs.srsid();
leSpatialRefSys->setText( srs.toProj4() );
leSpatialRefSys->setText( srs.authid() + " - " + srs.description() );

connect( mNameEdit, SIGNAL( textChanged( QString ) ), this, SLOT( nameChanged( QString ) ) );
connect( mAttributeView, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
Expand Down Expand Up @@ -162,8 +162,10 @@ void QgsNewVectorLayerDialog::on_pbnChangeSpatialRefSys_clicked()
mySelector->setSelectedCrsId( pbnChangeSpatialRefSys->text().toInt() );
if ( mySelector->exec() )
{
mCrsId = mySelector->selectedCrsId();
leSpatialRefSys->setText( mySelector->selectedAuthId() );
QgsCoordinateReferenceSystem srs;
srs.createFromOgcWmsCrs( mySelector->selectedAuthId() );
mCrsId = srs.srsid();
leSpatialRefSys->setText( srs.authid() + " - " + srs.description() );
}
else
{
Expand Down
99 changes: 37 additions & 62 deletions src/ui/qgsnewvectorlayerdialogbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>444</width>
<height>488</height>
<height>543</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -125,6 +125,32 @@
<item row="2" column="4">
<widget class="QLineEdit" name="mPrecision"/>
</item>
<item row="4" column="4">
<widget class="QToolButton" name="mAddAttributeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Add attribute to list</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Add to attributes list</string>
</property>
<property name="icon">
<iconset>
<normaloff>../../images/themes/default/mActionNewAttribute.png</normaloff>../../images/themes/default/mActionNewAttribute.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down Expand Up @@ -189,7 +215,7 @@
<item row="3" column="1">
<widget class="QToolButton" name="mRemoveAttributeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand All @@ -198,7 +224,7 @@
<string>Delete selected attribute</string>
</property>
<property name="text">
<string>Remove selected attribute</string>
<string>Remove attribute</string>
</property>
<property name="icon">
<iconset>
Expand All @@ -209,49 +235,10 @@
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QToolButton" name="mAddAttributeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Add attribute to list</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Add to attributes list</string>
</property>
<property name="icon">
<iconset>
<normaloff>../../images/themes/default/mActionNewAttribute.png</normaloff>../../images/themes/default/mActionNewAttribute.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="7" column="0" colspan="3">
<item row="8" column="0" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand All @@ -261,23 +248,6 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>CRS ID</string>
</property>
<property name="buddy">
<cstring>leSpatialRefSys</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="leSpatialRefSys">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pbnChangeSpatialRefSys">
<property name="toolTip">
Expand All @@ -291,6 +261,13 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLineEdit" name="leSpatialRefSys">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
Expand All @@ -305,9 +282,7 @@
<tabstop>mTypeBox</tabstop>
<tabstop>mWidth</tabstop>
<tabstop>mPrecision</tabstop>
<tabstop>mAddAttributeButton</tabstop>
<tabstop>mAttributeView</tabstop>
<tabstop>mRemoveAttributeButton</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
Expand Down

0 comments on commit 5b6b293

Please sign in to comment.