Skip to content
Permalink
Browse files

Nicer way of ensuring selected character is in view

  • Loading branch information
nyalldawson committed May 2, 2019
1 parent c534f5f commit 57fa54763a8340ab2a16b9f4eb203ddc0601ec16
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/symbology/characterwidget.cpp
@@ -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 );

0 comments on commit 57fa547

Please sign in to comment.
You can’t perform that action at this time.