Skip to content
Permalink
Browse files

[composer] Avoid hang when adding columns to table on Win (fix ##11462)

  • Loading branch information
nyalldawson committed Oct 22, 2014
1 parent 6be9d08 commit 5f9e45af49fed6ea33dc9d66dad3767e3c20a4f3
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/composer/qgscomposerattributetablewidget.cpp
@@ -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 )
{
@@ -197,6 +202,7 @@ void QgsComposerAttributeTableWidget::on_mAttributesPushButton_clicked()
{
//undo changes
mComposerTable->setColumns( currentColumns );
window()->setUpdatesEnabled( true );
if ( composition )
{
composition->cancelMultiFrameCommand();

0 comments on commit 5f9e45a

Please sign in to comment.
You can’t perform that action at this time.