--- a/src/lddocument.cpp Sat Mar 24 13:03:02 2018 +0200 +++ b/src/lddocument.cpp Sat Mar 24 13:11:17 2018 +0200 @@ -548,15 +548,15 @@ // ============================================================================= // -QString LDDocument::shortenName (QString a) // [static] +QString LDDocument::shortenName(const QFileInfo& path) // [static] { - QString shortname = Basename (a); - QString topdirname = Basename (Dirname (a)); + QString shortname = path.fileName(); + QString topdirname = QFileInfo {path.absoluteFilePath()}.dir().dirName(); - if (DocumentManager::specialSubdirectories.contains (topdirname)) - shortname.prepend (topdirname + "\\"); - - return shortname; + if (isOneOf(topdirname, "s", "48", "8")) + return topdirname + "\\" + shortname; + else + return shortname; } // =============================================================================