File tree Expand file tree Collapse file tree 1 file changed +19
-20
lines changed Expand file tree Collapse file tree 1 file changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -1044,35 +1044,34 @@ void QgsGrassModuleInput::onLayerChanged()
1044
1044
}
1045
1045
1046
1046
QgsGrassVectorLayer * layer = currentLayer ();
1047
- if ( multiple () )
1048
- if ( layer )
1047
+ if ( layer )
1048
+ {
1049
+ // number of types in the layer matching mGeometryTypeMask
1050
+ int typeCount = 0 ;
1051
+ foreach ( int type, layer->types () )
1049
1052
{
1050
- // number of types in the layer matching mGeometryTypeMask
1051
- int typeCount = 0 ;
1052
- foreach ( int type, layer->types () )
1053
+ if ( type & mGeometryTypeMask )
1053
1054
{
1054
- if ( type & mGeometryTypeMask )
1055
- {
1056
- typeCount++;
1057
- }
1055
+ typeCount++;
1058
1056
}
1059
- QgsDebugMsg ( QString ( " typeCount = %1" ).arg ( typeCount ) );
1057
+ }
1058
+ QgsDebugMsg ( QString ( " typeCount = %1" ).arg ( typeCount ) );
1060
1059
1061
- int layerType = layer->type (); // may be multiple
1062
- foreach ( int checkBoxType, mTypeCheckBoxes .keys () )
1060
+ int layerType = layer->type (); // may be multiple
1061
+ foreach ( int checkBoxType, mTypeCheckBoxes .keys () )
1062
+ {
1063
+ QCheckBox *checkBox = mTypeCheckBoxes .value ( checkBoxType );
1064
+ checkBox->hide ();
1065
+ if ( checkBoxType & layerType )
1063
1066
{
1064
- QCheckBox *checkBox = mTypeCheckBoxes .value ( checkBoxType );
1065
- checkBox->hide ();
1066
- if ( checkBoxType & layerType )
1067
+ checkBox->setChecked ( true );
1068
+ if ( typeCount > 1 )
1067
1069
{
1068
- checkBox->setChecked ( true );
1069
- if ( typeCount > 1 )
1070
- {
1071
- checkBox->show ();
1072
- }
1070
+ checkBox->show ();
1073
1071
}
1074
1072
}
1075
1073
}
1074
+ }
1076
1075
1077
1076
emit valueChanged ();
1078
1077
}
You can’t perform that action at this time.
0 commit comments