mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Nicer way of ensuring selected character is in view
This commit is contained in:
parent
c534f5f3ee
commit
57fa54763a
@ -118,7 +118,9 @@ void CharacterWidget::setCharacter( QChar character )
|
||||
{
|
||||
QScrollArea *scrollArea = qobject_cast< QScrollArea *>( widget->parent() );
|
||||
if ( scrollArea && mLastKey < 65536 )
|
||||
scrollArea->verticalScrollBar()->setValue( mLastKey / mColumns * mSquareSize );
|
||||
{
|
||||
scrollArea->ensureVisible( 0, mLastKey / mColumns * mSquareSize );
|
||||
}
|
||||
}
|
||||
if ( changed )
|
||||
emit characterSelected( mLastKey );
|
||||
|
Loading…
x
Reference in New Issue
Block a user