Navigation Menu

Skip to content

Commit

Permalink
Only restore selection if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 26, 2017
1 parent ef2d17f commit 98bad05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsfeaturelistcombobox.cpp
Expand Up @@ -213,5 +213,6 @@ void QgsFeatureListComboBox::LineEditState::restore( QLineEdit *lineEdit ) const
{
lineEdit->setText( text );
lineEdit->setCursorPosition( cursorPosition );
lineEdit->setSelection( selectionStart, selectionLength );
if ( selectionStart > -1 )
lineEdit->setSelection( selectionStart, selectionLength );
}

0 comments on commit 98bad05

Please sign in to comment.