File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1712,8 +1712,12 @@ void QgisApp::handleDropUriList( const QgsMimeDataUtils::UriList &lst )
1712
1712
// added all layers, and only emit the signal once for the final layer added
1713
1713
mBlockActiveLayerChanged = true ;
1714
1714
1715
+ QgsProxyProgressTask *proxyTask = new QgsProxyProgressTask ( tr ( " Loading layers" ) );
1716
+ QgsApplication::taskManager ()->addTask ( proxyTask );
1717
+
1715
1718
// insert items in reverse order as each one is inserted on top of previous one
1716
- for ( int i = lst.size () - 1 ; i >= 0 ; i-- )
1719
+ int count = 0 ;
1720
+ for ( int i = lst.size () - 1 ; i >= 0 ; i--, count++ )
1717
1721
{
1718
1722
const QgsMimeDataUtils::Uri &u = lst.at ( i );
1719
1723
@@ -1751,8 +1755,12 @@ void QgisApp::handleDropUriList( const QgsMimeDataUtils::UriList &lst )
1751
1755
{
1752
1756
openFile ( u.uri , QStringLiteral ( " project" ) );
1753
1757
}
1758
+
1759
+ proxyTask->setProxyProgress ( 100.0 * static_cast < double >( count ) / lst.size () );
1754
1760
}
1755
1761
1762
+ proxyTask->finalize ( true );
1763
+
1756
1764
mBlockActiveLayerChanged = false ;
1757
1765
emit activeLayerChanged ( activeLayer () );
1758
1766
}
You can’t perform that action at this time.
0 commit comments