src/lddocument.cpp

changeset 1329
025578d6e491
parent 1326
69a90bd2dba2
child 1340
ea1b3ea9a3ca
equal deleted inserted replaced
1328:d68d1ce89d05 1329:025578d6e491
546 } 546 }
547 } 547 }
548 548
549 // ============================================================================= 549 // =============================================================================
550 // 550 //
551 QString LDDocument::shortenName (QString a) // [static] 551 QString LDDocument::shortenName(const QFileInfo& path) // [static]
552 { 552 {
553 QString shortname = Basename (a); 553 QString shortname = path.fileName();
554 QString topdirname = Basename (Dirname (a)); 554 QString topdirname = QFileInfo {path.absoluteFilePath()}.dir().dirName();
555 555
556 if (DocumentManager::specialSubdirectories.contains (topdirname)) 556 if (isOneOf(topdirname, "s", "48", "8"))
557 shortname.prepend (topdirname + "\\"); 557 return topdirname + "\\" + shortname;
558 558 else
559 return shortname; 559 return shortname;
560 } 560 }
561 561
562 // ============================================================================= 562 // =============================================================================
563 // 563 //
564 const QSet<Vertex>& LDDocument::inlineVertices() 564 const QSet<Vertex>& LDDocument::inlineVertices()

mercurial