File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1530,8 +1530,12 @@ QList<QAction *> QgsProjectHomeItem::actions( QWidget *parent )
1530
1530
QAction *setHome = new QAction ( tr ( " Set Project Home…" ), parent );
1531
1531
connect ( setHome, &QAction::triggered, this , [ = ]
1532
1532
{
1533
+ QWidget *parentWindow = parent;
1534
+ while ( parentWindow->parentWidget () )
1535
+ parentWindow = parentWindow->parentWidget ();
1536
+
1533
1537
QString oldHome = QgsProject::instance ()->homePath ();
1534
- QString newPath = QFileDialog::getExistingDirectory ( parent-> window () , tr ( " Select Project Home Directory" ), oldHome );
1538
+ QString newPath = QFileDialog::getExistingDirectory ( parentWindow , tr ( " Select Project Home Directory" ), oldHome );
1535
1539
if ( !newPath.isEmpty () )
1536
1540
{
1537
1541
QgsProject::instance ()->setPresetHomePath ( newPath );
You can’t perform that action at this time.
0 commit comments