Try to make it more responsive.
This commit is contained in:
parent
9757de0d2c
commit
db69a860b0
@ -471,10 +471,6 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event )
|
|||||||
if ( candidateIndex.isValid() )
|
if ( candidateIndex.isValid() )
|
||||||
{
|
{
|
||||||
m_hoveredIndex = candidateIndex;
|
m_hoveredIndex = candidateIndex;
|
||||||
if ( !canBeSelected( candidateIndex ) )
|
|
||||||
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
|
||||||
else
|
|
||||||
QGuiApplication::restoreOverrideCursor();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -484,6 +480,11 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event )
|
|||||||
|
|
||||||
if ( oldHoveredIndex != m_hoveredIndex )
|
if ( oldHoveredIndex != m_hoveredIndex )
|
||||||
{
|
{
|
||||||
|
if ( !canBeSelected( m_hoveredIndex ) )
|
||||||
|
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||||
|
else
|
||||||
|
QGuiApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
viewport()->repaint();
|
viewport()->repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -492,10 +493,10 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event )
|
|||||||
void
|
void
|
||||||
PartitionBarsView::leaveEvent( QEvent* event )
|
PartitionBarsView::leaveEvent( QEvent* event )
|
||||||
{
|
{
|
||||||
|
QGuiApplication::restoreOverrideCursor();
|
||||||
if ( m_hoveredIndex.isValid() )
|
if ( m_hoveredIndex.isValid() )
|
||||||
{
|
{
|
||||||
m_hoveredIndex = QModelIndex();
|
m_hoveredIndex = QModelIndex();
|
||||||
QGuiApplication::restoreOverrideCursor();
|
|
||||||
viewport()->repaint();
|
viewport()->repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user