Skip to content

Commit

Permalink
Use wait cursor when loading forms
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 12, 2014
1 parent b1a2bef commit 3903f36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -362,6 +362,7 @@ void QgsRelationReferenceWidget::init()
{
if ( !mReadOnlySelector && mComboBox->count() == 0 && mReferencedLayer )
{
QApplication::setOverrideCursor( Qt::WaitCursor );
if ( mAllowNull )
{
const QString nullValue = QSettings().value( "qgis/nullValue", "NULL" ).toString();
Expand Down Expand Up @@ -393,6 +394,7 @@ void QgsRelationReferenceWidget::init()

// Only connect after iterating, to have only one iterator on the referenced table at once
connect( mComboBox, SIGNAL( activated( int ) ), this, SLOT( comboReferenceChanged( int ) ) );
QApplication::restoreOverrideCursor();
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -308,6 +308,7 @@ void QgsAttributeForm::synchronizeEnabledState()

void QgsAttributeForm::init()
{
QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
QWidget* formWidget = 0;

qDeleteAll( mWidgets );
Expand Down Expand Up @@ -458,6 +459,7 @@ void QgsAttributeForm::init()
{
iface->initForm();
}
QApplication::restoreOverrideCursor();
}

void QgsAttributeForm::cleanPython()
Expand Down

0 comments on commit 3903f36

Please sign in to comment.