Skip to content

Commit 5f9e45a

Browse files
committedOct 22, 2014
[composer] Avoid hang when adding columns to table on Win (fix ##11462)
1 parent 6be9d08 commit 5f9e45a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/app/composer/qgscomposerattributetablewidget.cpp

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,15 @@ void QgsComposerAttributeTableWidget::on_mAttributesPushButton_clicked()
179179
composition->beginMultiFrameCommand( mComposerTable, tr( "Table attribute settings" ) );
180180
}
181181

182+
//temporarily block updates for the window, to stop table trying to repaint under windows (#11462)
183+
window()->setUpdatesEnabled( false );
184+
182185
QgsAttributeSelectionDialog d( mComposerTable, mComposerTable->sourceLayer(), 0 );
183186
if ( d.exec() == QDialog::Accepted )
184187
{
185188
mComposerTable->refreshAttributes();
189+
//safe to unblock updates
190+
window()->setUpdatesEnabled( true );
186191
mComposerTable->update();
187192
if ( composition )
188193
{
@@ -197,6 +202,7 @@ void QgsComposerAttributeTableWidget::on_mAttributesPushButton_clicked()
197202
{
198203
//undo changes
199204
mComposerTable->setColumns( currentColumns );
205+
window()->setUpdatesEnabled( true );
200206
if ( composition )
201207
{
202208
composition->cancelMultiFrameCommand();

0 commit comments

Comments
 (0)
Please sign in to comment.