Skip to content

Commit

Permalink
[composer] Avoid hang when adding columns to table on Win (fix ##11462)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 22, 2014
1 parent 6be9d08 commit 5f9e45a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/composer/qgscomposerattributetablewidget.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,15 @@ void QgsComposerAttributeTableWidget::on_mAttributesPushButton_clicked()
composition->beginMultiFrameCommand( mComposerTable, tr( "Table attribute settings" ) );
}

//temporarily block updates for the window, to stop table trying to repaint under windows (#11462)
window()->setUpdatesEnabled( false );

QgsAttributeSelectionDialog d( mComposerTable, mComposerTable->sourceLayer(), 0 );
if ( d.exec() == QDialog::Accepted )
{
mComposerTable->refreshAttributes();
//safe to unblock updates
window()->setUpdatesEnabled( true );
mComposerTable->update();
if ( composition )
{
Expand All @@ -197,6 +202,7 @@ void QgsComposerAttributeTableWidget::on_mAttributesPushButton_clicked()
{
//undo changes
mComposerTable->setColumns( currentColumns );
window()->setUpdatesEnabled( true );
if ( composition )
{
composition->cancelMultiFrameCommand();
Expand Down

0 comments on commit 5f9e45a

Please sign in to comment.