mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
Maybe don't crash.
This commit is contained in:
parent
9ecd23dfc7
commit
ea7b95e474
2 changed files with 12 additions and 6 deletions
|
@ -480,7 +480,7 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event )
|
|||
|
||||
if ( oldHoveredIndex != m_hoveredIndex )
|
||||
{
|
||||
if ( !canBeSelected( m_hoveredIndex ) )
|
||||
if ( m_hoveredIndex.isValid() && !canBeSelected( m_hoveredIndex ) )
|
||||
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||
else
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
|
|
|
@ -557,14 +557,20 @@ PartitionLabelsView::mouseMoveEvent( QMouseEvent* event )
|
|||
m_hoveredIndex = candidateIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_hoveredIndex = QModelIndex();
|
||||
|
||||
if ( !canBeSelected( m_hoveredIndex ) )
|
||||
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||
else
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
viewport()->repaint();
|
||||
if ( oldHoveredIndex != m_hoveredIndex )
|
||||
{
|
||||
if ( m_hoveredIndex.isValid() && !canBeSelected( m_hoveredIndex ) )
|
||||
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||
else
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
|
||||
viewport()->repaint();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue