mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[composer] Avoid hang when adding columns to table on Win (fix ##11462)
This commit is contained in:
parent
6be9d08061
commit
5f9e45af49
6
src/app/composer/qgscomposerattributetablewidget.cpp
Normal file → Executable file
6
src/app/composer/qgscomposerattributetablewidget.cpp
Normal file → Executable file
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user