Skip to content

Commit 7b2d03b

Browse files
committedJan 7, 2016
[StyleManager] import to "ungrouped" when no groupname entered
1 parent 284704a commit 7b2d03b

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed
 

‎src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -231,35 +231,8 @@ void QgsStyleV2ExportImportDialog::moveStyles( QModelIndexList* selection, QgsSt
231231
QString name = groupCombo->currentText();
232232
if ( name.isEmpty() )
233233
{
234-
// get name of the group
235-
bool nameInvalid = true;
236-
while ( nameInvalid )
237-
{
238-
bool ok;
239-
name = QInputDialog::getText( this, tr( "Group Name" ),
240-
tr( "Please enter a name for new group:" ),
241-
QLineEdit::Normal,
242-
tr( "imported" ),
243-
&ok );
244-
if ( !ok )
245-
{
246-
QMessageBox::warning( this, tr( "New Group" ),
247-
tr( "New group cannot be created without a name. Kindly enter a name." ) );
248-
continue;
249-
}
250-
// validate name
251-
if ( name.isEmpty() )
252-
{
253-
QMessageBox::warning( this, tr( "New group" ),
254-
tr( "Cannot create a group without name. Enter a name." ) );
255-
}
256-
else
257-
{
258-
// valid name
259-
nameInvalid = false;
260-
}
261-
}
262-
groupid = dst->addGroup( name );
234+
// import to "ungrouped"
235+
groupid = 0;
263236
}
264237
else if ( dst->groupNames().contains( name ) )
265238
{

0 commit comments

Comments
 (0)
Please sign in to comment.