Skip to content

Commit

Permalink
Fix index-out-of-range warning
Browse files Browse the repository at this point in the history
Fixes index-out-of-range warning emitted by QList::insert() in debug
mode.
  • Loading branch information
stefanuhrig committed Feb 2, 2021
1 parent 8405ca7 commit 143536c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsoptionsdialogbase.cpp
Expand Up @@ -116,11 +116,11 @@ void QgsOptionsDialogBase::initOptionsBase( bool restoreUi, const QString &title
if ( buttonBoxFrame )
{
buttonBoxFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
layout->insertWidget( layout->count() + 1, buttonBoxFrame );
layout->insertWidget( layout->count(), buttonBoxFrame );
}
else if ( mOptButtonBox )
{
layout->insertWidget( layout->count() + 1, mOptButtonBox );
layout->insertWidget( layout->count(), mOptButtonBox );
}

if ( mOptButtonBox )
Expand Down

0 comments on commit 143536c

Please sign in to comment.