Skip to content

Commit

Permalink
Only emit QgsCollapsibleGroupBoxBasic::collapsedStateChanged when sta…
Browse files Browse the repository at this point in the history
…te really has changed
  • Loading branch information
manisandro authored and nyalldawson committed Jun 6, 2016
1 parent d984148 commit 221c4e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/qgscollapsiblegroupbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ void QgsCollapsibleGroupBoxBasic::updateStyle()

void QgsCollapsibleGroupBoxBasic::setCollapsed( bool collapse )
{
bool changed = collapse != mCollapsed;
mCollapsed = collapse;

if ( !isVisible() )
Expand Down Expand Up @@ -438,7 +439,8 @@ void QgsCollapsibleGroupBoxBasic::setCollapsed( bool collapse )
mParentScrollArea->setUpdatesEnabled( true );
}
// emit signal for connections using collapsed state
emit collapsedStateChanged( isCollapsed() );
if ( changed )
emit collapsedStateChanged( isCollapsed() );
}

void QgsCollapsibleGroupBoxBasic::collapseExpandFixes()
Expand Down

0 comments on commit 221c4e0

Please sign in to comment.