Skip to content

Commit 9083b2d

Browse files
authored
Merge pull request #1638 from tskaar/dev/ts/save-symbol-extension
fix(saveAs): append '.sym' for symbol files
2 parents 1ebbf9d + b41c98d commit 9083b2d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

qucs/qucs.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,8 +1919,14 @@ bool QucsApp::saveAs()
19191919
// if no extension was specified or is unknown
19201920
if (!isTextDocument (w))
19211921
{
1922-
// assume it is a schematic
1923-
s += ".sch";
1922+
// if it's a symbol, we add .sym
1923+
Schematic *sch = dynamic_cast<Schematic*>(Doc);
1924+
if (sch != nullptr && sch->getIsSymbolOnly()) {
1925+
s += ".sym";
1926+
} else {
1927+
// otherwise assume it is a schematic
1928+
s += ".sch";
1929+
}
19241930
}
19251931
}
19261932

0 commit comments

Comments
 (0)