Skip to content
Permalink
Browse files

[GRASS] fixed interactive cat input selection for polygons

  • Loading branch information
blazek committed Sep 26, 2015
1 parent 9df1a08 commit ddecc6f5d8e6961d459503a62e8eadd5221f07f4
Showing with 3 additions and 4 deletions.
  1. +3 −1 src/plugins/grass/qgsgrassmoduleinput.cpp
  2. +0 −3 src/plugins/grass/qgsgrassmoduleparam.cpp
@@ -975,6 +975,7 @@ QStringList QgsGrassModuleInput::currentLayerCodes()
{
Q_FOREACH ( QString type, currentGeometryTypeNames() )
{
type.replace( "area", "polygon" );
list << QString( "%1_%2" ).arg( currentLayer()->number() ).arg( type );
}
}
@@ -1015,7 +1016,8 @@ void QgsGrassModuleInput::onChanged( const QString & text )
foreach ( QgsGrassVectorLayer *layer, mVector->layers() )
{
QgsDebugMsg( QString( "layer->number() = %1 layer.type() = %2 mGeometryTypeMask = %3" ).arg( layer->number() ).arg( layer->type() ).arg( mGeometryTypeMask ) );
if ( layer->type() & mGeometryTypeMask )
// TODO: does it make sense to add layer 0, i.e. no layer?
if ( layer->number() > 0 && layer->type() & mGeometryTypeMask )
{
mLayers.append( layer );
}
@@ -1197,7 +1197,6 @@ QgsGrassModuleSelection::QgsGrassModuleSelection(

QDomNode promptNode = gnode.namedItem( "gisprompt" );
QDomElement promptElem = promptNode.toElement();
QString element = promptElem.attribute( "element" );

mLayerId = qdesc.attribute( "layerid" );

@@ -1213,11 +1212,9 @@ QgsGrassModuleSelection::QgsGrassModuleSelection(

QHBoxLayout *l = new QHBoxLayout( this );
mLineEdit = new QLineEdit( this );
//mLineEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
l->addWidget( mLineEdit );

mModeComboBox = new QComboBox( this );
//mComboBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
mModeComboBox->setSizeAdjustPolicy( QComboBox::AdjustToContents );
mModeComboBox->addItem( tr( "Manual entry" ), Manual );
connect( mModeComboBox, SIGNAL( currentIndexChanged( int ) ), SLOT( onModeChanged() ) );

0 comments on commit ddecc6f

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