Skip to content

Commit 070b28a

Browse files
committed
Followup 75fcd2, fix incorrect refreshing icon if mssql connection
loaded while collapsed
1 parent 99cef42 commit 070b28a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/providers/mssql/qgsmssqldataitems.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ QVector<QgsDataItem*> QgsMssqlConnectionItem::createChildren()
116116
{
117117
QgsDebugMsg( "Entered" );
118118

119+
setState( Populating );
120+
119121
stop();
120122

121123
QVector<QgsDataItem*> children;
@@ -248,25 +250,26 @@ QVector<QgsDataItem*> QgsMssqlConnectionItem::createChildren()
248250
// spawn threads (new layers will be added later on)
249251
if ( mColumnTypeThread )
250252
{
251-
connect( mColumnTypeThread, SIGNAL( finished() ), this, SLOT( setChildrenAsPopulated() ) );
253+
connect( mColumnTypeThread, SIGNAL( finished() ), this, SLOT( setAsPopulated() ) );
252254
mColumnTypeThread->start();
253255
}
254256
else
255257
{
256258
//set all as populated
257-
setChildrenAsPopulated();
259+
setAsPopulated();
258260
}
259261
}
260262

261263
return children;
262264
}
263265

264-
void QgsMssqlConnectionItem::setChildrenAsPopulated()
266+
void QgsMssqlConnectionItem::setAsPopulated()
265267
{
266268
Q_FOREACH ( QgsDataItem *child, mChildren )
267269
{
268270
child->setState( Populated );
269271
}
272+
setState( Populated );
270273
}
271274

272275
void QgsMssqlConnectionItem::setLayerType( QgsMssqlLayerProperty layerProperty )

src/providers/mssql/qgsmssqldataitems.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class QgsMssqlConnectionItem : public QgsDataCollectionItem
7878
void refresh() override;
7979

8080
private slots:
81-
void setChildrenAsPopulated();
81+
void setAsPopulated();
8282

8383
private:
8484
QString mConnInfo;

0 commit comments

Comments
 (0)