Skip to content
Permalink
Browse files

[geometry-checker-ui] use qgsmalayercombobox for layers list

  • Loading branch information
slarosa committed Sep 29, 2015
1 parent dfb7819 commit 14374335be3661b31df927e3d6c742d3027f3802
@@ -45,6 +45,7 @@ QgsGeometryCheckerSetupTab::QgsGeometryCheckerSetupTab( QgisInterface* iface , Q
ui.setupUi( this );
ui.progressBar->hide();
ui.labelStatus->hide();
ui.comboBoxInputLayer->setFilters( QgsMapLayerProxyModel::HasGeometry );
mRunButton = ui.buttonBox->addButton( tr( "Run" ), QDialogButtonBox::ActionRole );
mAbortButton = new QPushButton( tr( "Abort" ) );
mRunButton->setEnabled( false );
@@ -107,8 +108,8 @@ QgsVectorLayer* QgsGeometryCheckerSetupTab::getSelectedLayer()
{
return 0;
}
QString inputLayerId = ui.comboBoxInputLayer->itemData( inputIdx ).toString();
return static_cast<QgsVectorLayer*>( QgsMapLayerRegistry::instance()->mapLayer( inputLayerId ) );
QgsVectorLayer *layer = dynamic_cast<QgsVectorLayer*>( ui.comboBoxInputLayer->currentLayer() );
return layer;
}

void QgsGeometryCheckerSetupTab::validateInput()
@@ -32,7 +32,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-276</y>
<y>0</y>
<width>625</width>
<height>767</height>
</rect>
@@ -72,7 +72,7 @@
<number>2</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxInputLayer"/>
<widget class="QgsMapLayerComboBox" name="comboBoxInputLayer"/>
</item>
<item>
<widget class="QCheckBox" name="checkBoxInputSelectedOnly">
@@ -616,6 +616,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsMapLayerComboBox</class>
<extends>QComboBox</extends>
<header location="global">qgsmaplayercombobox.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../pluginres.qrc"/>
</resources>

0 comments on commit 1437433

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