Commit b081d936 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Avoid repeated conversion to QPointF in loop

parent 567575e9
......@@ -358,10 +358,12 @@ QList<AbstractDataPluginItem*> AbstractDataPluginModel::items( const ViewportPar
QList<AbstractDataPluginItem *> AbstractDataPluginModel::whichItemAt( const QPoint& curpos )
{
QList<AbstractDataPluginItem *> itemsAt;
const QPointF curposF(curpos);
foreach( AbstractDataPluginItem* item, d->m_displayedItems ) {
if( item && item->contains( QPointF( curpos ) ) )
if (item && item->contains(curposF)) {
itemsAt.append( item );
}
}
return itemsAt;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment