Skip to content
Permalink
Browse files

Followup 75fcd2, fix incorrect refreshing icon if mssql connection

loaded while collapsed
  • Loading branch information
nyalldawson committed Feb 5, 2016
1 parent 99cef42 commit 070b28a800127c777ce0cedc76a708feb512a86c
Showing with 7 additions and 4 deletions.
  1. +6 −3 src/providers/mssql/qgsmssqldataitems.cpp
  2. +1 −1 src/providers/mssql/qgsmssqldataitems.h
@@ -116,6 +116,8 @@ QVector<QgsDataItem*> QgsMssqlConnectionItem::createChildren()
{
QgsDebugMsg( "Entered" );

setState( Populating );

stop();

QVector<QgsDataItem*> children;
@@ -248,25 +250,26 @@ QVector<QgsDataItem*> QgsMssqlConnectionItem::createChildren()
// spawn threads (new layers will be added later on)
if ( mColumnTypeThread )
{
connect( mColumnTypeThread, SIGNAL( finished() ), this, SLOT( setChildrenAsPopulated() ) );
connect( mColumnTypeThread, SIGNAL( finished() ), this, SLOT( setAsPopulated() ) );
mColumnTypeThread->start();
}
else
{
//set all as populated
setChildrenAsPopulated();
setAsPopulated();
}
}

return children;
}

void QgsMssqlConnectionItem::setChildrenAsPopulated()
void QgsMssqlConnectionItem::setAsPopulated()
{
Q_FOREACH ( QgsDataItem *child, mChildren )
{
child->setState( Populated );
}
setState( Populated );
}

void QgsMssqlConnectionItem::setLayerType( QgsMssqlLayerProperty layerProperty )
@@ -78,7 +78,7 @@ class QgsMssqlConnectionItem : public QgsDataCollectionItem
void refresh() override;

private slots:
void setChildrenAsPopulated();
void setAsPopulated();

private:
QString mConnInfo;

0 comments on commit 070b28a

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