diff options
| author | Sebastian Trueg <[email protected]> | 2009-01-20 17:41:56 +0000 |
|---|---|---|
| committer | Sebastian Trueg <[email protected]> | 2009-01-20 17:41:56 +0000 |
| commit | 02781d747d87f6baef9c8a0ee347357f9e201764 (patch) | |
| tree | 738bdc488bfcfe98ae5946043497befb82bba6b6 | |
| parent | 9aa43f8bae6d538c9bd6c176fea5d9d3857d3cf0 (diff) | |
Only actually change the resource if tags were changed.
svn path=/trunk/KDE/kdebase/apps/; revision=914234
| -rw-r--r-- | src/panels/information/resourcetaggingwidget.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/panels/information/resourcetaggingwidget.cpp b/src/panels/information/resourcetaggingwidget.cpp index 3a4da3ea9..34892f30c 100644 --- a/src/panels/information/resourcetaggingwidget.cpp +++ b/src/panels/information/resourcetaggingwidget.cpp @@ -48,6 +48,8 @@ public: QList<Tag> resourceTags; + bool tagsChanged; + void showTaggingPopup( const QPoint& ); void _k_slotShowTaggingPopup(); void _k_metadataUpdateDone(); @@ -65,13 +67,16 @@ void Nepomuk::ResourceTaggingWidget::Private::showTaggingPopup( const QPoint& po popup->setTagSelected( tag, true ); } + tagsChanged = false; popup->exec( pos ); - MassUpdateJob* job = MassUpdateJob::tagResources( resources, resourceTags ); - connect( job, SIGNAL( result( KJob* ) ), - q, SLOT( _k_metadataUpdateDone() ) ); - q->setEnabled( false ); // no updates during execution - job->start(); + if( tagsChanged ) { + MassUpdateJob* job = MassUpdateJob::tagResources( resources, resourceTags ); + connect( job, SIGNAL( result( KJob* ) ), + q, SLOT( _k_metadataUpdateDone() ) ); + q->setEnabled( false ); // no updates during execution + job->start(); + } resourceTagCloud->showTags( resourceTags ); } @@ -167,6 +172,7 @@ void Nepomuk::ResourceTaggingWidget::slotTagToggled( const Nepomuk::Tag& tag, bo else { d->resourceTags.removeAll( tag ); } + d->tagsChanged = true; d->popup->hide(); } |
