MCPcopy Create free account
hub / github.com/MrKepzie/Natron / parentFolder

Method parentFolder

Gui/SequenceFileDialog.cpp:1365–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1363}
1364
1365void
1366SequenceFileDialog::parentFolder()
1367{
1368 QString newDir;
1369 QString rootPath = _model->rootPath();
1370
1371 if ( FileSystemModel::isDriveName(rootPath) ) {
1372 newDir = QString();
1373 } else {
1374 QDir dir(rootPath);
1375 dir.cdUp();
1376 newDir = dir.absolutePath();
1377 }
1378
1379
1380#ifdef __NATRON_WIN32__
1381 if ( FileSystemModel::isDriveName(newDir) ) {
1382 _upButton->setEnabled(false);
1383 } else {
1384 _upButton->setEnabled(true);
1385 }
1386#else
1387 if ( FileSystemModel::isDriveName(newDir) || newDir.isEmpty() ) {
1388 _upButton->setEnabled(false);
1389
1390 return;
1391 } else {
1392 _upButton->setEnabled(true);
1393 }
1394
1395#endif
1396
1397
1398 setDirectory(newDir);
1399}
1400
1401void
1402SequenceFileDialog::showHidden()

Callers

nothing calls this directly

Calls 5

QStringClass · 0.85
absolutePathMethod · 0.80
rootPathMethod · 0.45
setEnabledMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected