Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for hiding deprecated datum transforms
  • Loading branch information
mhugent committed Jan 30, 2014
1 parent a4f1470 commit db277ce
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/gui/CMakeLists.txt
Expand Up @@ -218,6 +218,7 @@ qgscomposerruler.h
qgscomposerview.h
qgscredentialdialog.h
qgsdatadefinedbutton.h
qgsdatumtransformdialog.h
qgsdetaileditemdelegate.h
qgsdetaileditemwidget.h
qgsdialog.h
Expand Down
17 changes: 14 additions & 3 deletions src/gui/qgsdatumtransformdialog.cpp
Expand Up @@ -56,6 +56,7 @@ void QgsDatumTransformDialog::load()
{
QTreeWidgetItem *item = new QTreeWidgetItem();
bool itemDisabled = false;
bool itemHidden = false;

for ( int i = 0; i < 2 && i < it->size(); ++i )
{
Expand All @@ -74,7 +75,9 @@ void QgsDatumTransformDialog::load()
continue;

if ( mHideDeprecatedCheckBox->isChecked() && deprecated )
continue;
{
itemHidden = true;
}

QString toolTipString;
if ( gridShiftTransformation( item->text( i ) ) )
Expand Down Expand Up @@ -103,8 +106,16 @@ void QgsDatumTransformDialog::load()
itemDisabled = true;
}
}
item->setDisabled( itemDisabled );
mDatumTransformTreeWidget->addTopLevelItem( item );

if ( !itemHidden )
{
item->setDisabled( itemDisabled );
mDatumTransformTreeWidget->addTopLevelItem( item );
}
else
{
delete item;
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsdatumtransformdialog.h
Expand Up @@ -22,6 +22,7 @@

class GUI_EXPORT QgsDatumTransformDialog: public QDialog, private Ui::QgsDatumTransformDialogBase
{
Q_OBJECT
public:
QgsDatumTransformDialog( const QString& layerName, const QList< QList< int > >& dt, QWidget * parent = 0, Qt::WindowFlags f = 0 );
~QgsDatumTransformDialog();
Expand Down

0 comments on commit db277ce

Please sign in to comment.