Skip to content

Commit

Permalink
fix symbol selection
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14478 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 1, 2010
1 parent 675a3a5 commit 5ec236c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/qgssinglesymboldialog.cpp
Expand Up @@ -108,8 +108,6 @@ QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disab
connect( btnFillColor, SIGNAL( clicked() ), this, SLOT( selectFillColor() ) );
connect( outlinewidthspinbox, SIGNAL( valueChanged( double ) ), this, SLOT( resendSettingsChanged() ) );
connect( mLabelEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( resendSettingsChanged() ) );
connect( lstSymbols, SIGNAL( currentChanged( const QModelIndex & , const QModelIndex & ) ),
this, SLOT( symbolChanged( const QModelIndex & , const QModelIndex & ) ) );
connect( mPointSizeSpinBox, SIGNAL( valueChanged( double ) ), this, SLOT( resendSettingsChanged() ) );
connect( mPointSizeUnitsCheckBox, SIGNAL( toggled( bool ) ), this, SLOT( resendSettingsChanged() ) );
connect( mRotationClassificationComboBox, SIGNAL( currentIndexChanged( const QString & ) ),
Expand All @@ -135,6 +133,9 @@ void QgsSingleSymbolDialog::refreshMarkers()
QgsMarkerListModel *m = new QgsMarkerListModel( lstSymbols );
lstSymbols->setModel( m );

connect( lstSymbols->selectionModel(), SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
this, SLOT( symbolChanged( const QModelIndex &, const QModelIndex & ) ) );

// Find out the numerical fields of mVectorLayer, and populate the ComboBoxes
QgsVectorDataProvider *provider = mVectorLayer->dataProvider();
if ( provider )
Expand Down Expand Up @@ -639,7 +640,7 @@ void QgsSingleSymbolDialog::symbolChanged( const QModelIndex &current, const QMo
QAbstractItemModel *m = lstSymbols->model();
QgsDebugMsg( QString( "symbol changed to %1:%2" ).arg( current.row() ).arg( m->data( current, Qt::UserRole ).toString() ) );
// m->setData( current, Qt::UserRole+1, Qt::cyan );
// m->setData( prev, Qt::UserRole+1, Qt::white );
// m->setData( previous, Qt::UserRole+1, Qt::white );
emit settingsChanged();
}

Expand Down

0 comments on commit 5ec236c

Please sign in to comment.