Show selected CRS. Fix #5563

This commit is contained in:
Nathan Woodrow 2013-05-26 12:42:05 +10:00
parent 6164aced8d
commit 8cbf901b6a
2 changed files with 47 additions and 19 deletions

View File

@ -273,6 +273,7 @@ void QgsProjectionSelector::applySelection( int column, QString value )
lstCoordinateSystems->clearSelection(); lstCoordinateSystems->clearSelection();
lstRecent->clearSelection(); lstRecent->clearSelection();
teProjection->setText( "" ); teProjection->setText( "" );
teSelected->setText( "" );
} }
} }
@ -720,6 +721,7 @@ void QgsProjectionSelector::on_lstCoordinateSystems_currentItemChanged( QTreeWid
emit sridSelected( QString::number( selectedCrsId() ) ); emit sridSelected( QString::number( selectedCrsId() ) );
teProjection->setText( selectedProj4String() ); teProjection->setText( selectedProj4String() );
teSelected->setText( selectedName() );
QList<QTreeWidgetItem*> nodes = lstRecent->findItems( current->text( QGIS_CRS_ID_COLUMN ), Qt::MatchExactly, QGIS_CRS_ID_COLUMN ); QList<QTreeWidgetItem*> nodes = lstRecent->findItems( current->text( QGIS_CRS_ID_COLUMN ), Qt::MatchExactly, QGIS_CRS_ID_COLUMN );
if ( nodes.count() > 0 ) if ( nodes.count() > 0 )
@ -739,6 +741,7 @@ void QgsProjectionSelector::on_lstCoordinateSystems_currentItemChanged( QTreeWid
// Not an CRS - remove the highlight so the user doesn't get too confused // Not an CRS - remove the highlight so the user doesn't get too confused
current->setSelected( false ); current->setSelected( false );
teProjection->setText( "" ); teProjection->setText( "" );
teSelected->setText( "" );
lstRecent->clearSelection(); lstRecent->clearSelection();
} }
} }
@ -775,6 +778,7 @@ void QgsProjectionSelector::hideDeprecated( QTreeWidgetItem *item )
{ {
item->setSelected( false ); item->setSelected( false );
teProjection->setText( "" ); teProjection->setText( "" );
teSelected->setText( "" );
} }
} }

View File

@ -25,22 +25,10 @@
</iconset> </iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label">
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
<item>
<widget class="QgsFilterLineEdit" name="leSearch"/>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="font"> <property name="font">
<font> <font>
<weight>75</weight> <weight>75</weight>
@ -48,10 +36,19 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Recently used coordinate reference systems</string> <string>Selected CRS:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLineEdit" name="teSelected">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QSplitter" name="splitter"> <widget class="QSplitter" name="splitter">
<property name="orientation"> <property name="orientation">
@ -189,7 +186,34 @@
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
<item>
<widget class="QgsFilterLineEdit" name="leSearch"/>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Recently used coordinate reference systems</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QTextEdit" name="teProjection"> <widget class="QTextEdit" name="teProjection">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>