Skip to content

Commit d2f08ee

Browse files
author
Arunmozhi
committedAug 13, 2012
removed project/recent symbol groups which aren't a part of style
1 parent c70e007 commit d2f08ee

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed
 

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

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -624,22 +624,6 @@ void QgsStyleV2ManagerDialog::populateGroups()
624624
setBold( allSymbols );
625625
model->appendRow( allSymbols );
626626

627-
QStandardItem *projectSymbols = new QStandardItem( "Project Symbols" );
628-
projectSymbols->setData( "project" );
629-
projectSymbols->setEditable( false );
630-
setBold( projectSymbols );
631-
model->appendRow( projectSymbols );
632-
633-
/* TODO
634-
*
635-
QStandardItem *recent = new QStandardItem( "Recently Used" );
636-
recent->setData( "recent" );
637-
recent->setEditable( false );
638-
setBold( recent );
639-
model->appendRow( recent );
640-
*
641-
*/
642-
643627
QStandardItem *group = new QStandardItem( "" ); //require empty name to get first order groups
644628
group->setData( "groups" );
645629
group->setEditable( false );
@@ -711,19 +695,7 @@ void QgsStyleV2ManagerDialog::groupChanged( const QModelIndex& index )
711695
}
712696
symbolNames = currentItemType() < 3 ? mStyle->symbolNames() : mStyle->colorRampNames();
713697
}
714-
else if ( category == "recent" )
715-
{
716-
// TODO add session symbols
717-
enableGroupInputs( false );
718-
symbolNames = QStringList();
719-
}
720-
else if ( category == "project" )
721-
{
722-
// TODO add project symbols
723-
enableGroupInputs( false );
724-
symbolNames = QStringList();
725-
}
726-
else
698+
else
727699
{
728700
//determine groups and tags
729701
if ( index.parent().data( Qt::UserRole + 1 ) == "smartgroups" )
@@ -769,8 +741,7 @@ void QgsStyleV2ManagerDialog::addGroup()
769741

770742
// Violation 1: Creating sub-groups of system defined groups
771743
QString parentData = parentIndex.data( Qt::UserRole + 1 ).toString();
772-
if ( parentData == "all" || parentData == "recent" || parentData == "project" ||
773-
( parentIndex.data() == "Ungrouped" && parentData == "0" ) )
744+
if ( parentData == "all" || ( parentIndex.data() == "Ungrouped" && parentData == "0" ) )
774745
{
775746
int err = QMessageBox::critical( this, tr( "Invalid Selection" ),
776747
tr( "The parent group you have selected is not user editable.\n"
@@ -832,7 +803,7 @@ void QgsStyleV2ManagerDialog::removeGroup()
832803

833804
// Violation: removing system groups
834805
QString data = index.data( Qt::UserRole + 1 ).toString();
835-
if ( data == "all" || data == "recent" || data == "project" || data == "groups" || data == "smartgroups" || index.data() == "Ungrouped" )
806+
if ( data == "all" || data == "groups" || data == "smartgroups" || index.data() == "Ungrouped" )
836807
{
837808
int err = QMessageBox::critical( this, tr( "Invalid slection" ),
838809
tr( "Cannot delete system defined categories.\n"

0 commit comments

Comments
 (0)
Please sign in to comment.