Skip to content
Permalink
Browse files

[StyleManager] import to "ungrouped" when no groupname entered

  • Loading branch information
SebDieBln committed Jan 7, 2016
1 parent 284704a commit 7b2d03ba56a13a851cf46b5681df520ec9fd3b2f
Showing with 2 additions and 29 deletions.
  1. +2 −29 src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
@@ -231,35 +231,8 @@ void QgsStyleV2ExportImportDialog::moveStyles( QModelIndexList* selection, QgsSt
QString name = groupCombo->currentText();
if ( name.isEmpty() )
{
// get name of the group
bool nameInvalid = true;
while ( nameInvalid )
{
bool ok;
name = QInputDialog::getText( this, tr( "Group Name" ),
tr( "Please enter a name for new group:" ),
QLineEdit::Normal,
tr( "imported" ),
&ok );
if ( !ok )
{
QMessageBox::warning( this, tr( "New Group" ),
tr( "New group cannot be created without a name. Kindly enter a name." ) );
continue;
}
// validate name
if ( name.isEmpty() )
{
QMessageBox::warning( this, tr( "New group" ),
tr( "Cannot create a group without name. Enter a name." ) );
}
else
{
// valid name
nameInvalid = false;
}
}
groupid = dst->addGroup( name );
// import to "ungrouped"
groupid = 0;
}
else if ( dst->groupNames().contains( name ) )
{

0 comments on commit 7b2d03b

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