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 30, 2016
1 parent 42fa83c commit 5aa69ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/qgscollapsiblegroupbox.cpp
Expand Up @@ -408,6 +408,7 @@ void QgsCollapsibleGroupBoxBasic::updateStyle()

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

if ( !isVisible() )
Expand Down Expand Up @@ -444,7 +445,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 5aa69ce

Please sign in to comment.