diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 8578e04f..90900113 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -1401,7 +1401,6 @@ void UBDocumentTreeView::hSliderRangeChanged(int min, int max) void UBDocumentTreeView::mousePressEvent(QMouseEvent *event) { QTreeView::mousePressEvent(event); - UBApplication::documentController->updateActions(); } void UBDocumentTreeView::dragEnterEvent(QDragEnterEvent *event) @@ -1942,9 +1941,11 @@ void UBDocumentController::TreeViewSelectionChanged(const QModelIndex ¤t, //We have just to pass a null proxy to disable the display of thumbnail UBDocumentProxy *currentDocumentProxy = 0; - if(current_index.isValid() && mDocumentUI->documentTreeView->selectionModel()->selectedRows(0).size() == 1){ + if(current_index.isValid() && mDocumentUI->documentTreeView->selectionModel()->selectedRows(0).size() == 1) + { currentDocumentProxy = docModel->proxyData(current_index); setDocument(currentDocumentProxy, false); + clearThumbnailsSelection(); } //N/C - NNE - 20140414 : END @@ -3907,3 +3908,8 @@ void UBDocumentController::expandAll() mDocumentUI->documentTreeView->setAnimated(true); } + +void UBDocumentController::clearThumbnailsSelection() +{ + mDocumentUI->thumbnailWidget->clearSelection(); +} diff --git a/src/document/UBDocumentController.h b/src/document/UBDocumentController.h index 3b634175..87e7e83a 100644 --- a/src/document/UBDocumentController.h +++ b/src/document/UBDocumentController.h @@ -458,6 +458,8 @@ class UBDocumentController : public UBDocumentContainer QModelIndex findNextSiblingNotSelected(const QModelIndex &index, QItemSelectionModel *selectionModel); bool parentIsSelected(const QModelIndex& child, QItemSelectionModel *selectionModel); + void clearThumbnailsSelection(); + signals: void exportDone(); void reorderDocumentsRequested(); diff --git a/src/gui/UBThumbnailWidget.cpp b/src/gui/UBThumbnailWidget.cpp index abb217e2..7d2304d0 100644 --- a/src/gui/UBThumbnailWidget.cpp +++ b/src/gui/UBThumbnailWidget.cpp @@ -232,6 +232,11 @@ QList UBThumbnailWidget::selectedItems() return sortedSelectedItems; } +void UBThumbnailWidget::clearSelection() +{ + mThumbnailsScene.clearSelection(); +} + void UBThumbnailWidget::mousePressEvent(QMouseEvent *event) { diff --git a/src/gui/UBThumbnailWidget.h b/src/gui/UBThumbnailWidget.h index 527b9cc2..9b1a3cbb 100644 --- a/src/gui/UBThumbnailWidget.h +++ b/src/gui/UBThumbnailWidget.h @@ -66,6 +66,7 @@ class UBThumbnailWidget : public QGraphicsView QList selectedItems(); void selectItemAt(int pIndex, bool extend = false); void unselectItemAt(int pIndex); + void clearSelection(); qreal thumbnailWidth() {