diff --git a/sources/elementspanel.cpp b/sources/elementspanel.cpp index 31353c5c8..e55509253 100644 --- a/sources/elementspanel.cpp +++ b/sources/elementspanel.cpp @@ -132,6 +132,11 @@ bool ElementsPanel::selectedItemIsWritable() const { @return la collection, la categorie ou l'element selectionne(e) */ ElementsCollectionItem *ElementsPanel::selectedItem() const { + // change color of drag element + if(it_prev_) { + it_prev_->setBackgroundColor(0, Qt::white); + } + ElementsLocation selected_location(selectedElementLocation()); if (!selected_location.isNull()) { return(QETApp::collectionItem(selected_location)); @@ -199,7 +204,18 @@ void ElementsPanel::dragMoveEvent(QDragMoveEvent *e) { return; } #endif - + + // Change color on mouse over + it_ = itemAt(e -> pos()); + if(it_prev_){ + if(it_ != it_prev_){ + it_->setBackgroundColor(0, Qt::cyan); + it_prev_->setBackgroundColor(0, Qt::white); + it_prev_ = it_; + } + } + else it_prev_ = it_; + e -> accept(); /// @todo mettre en valeur le lieu de depot }