[TD]assorted Preference updates

- section line convention label
- remove superfluous save/restore on changeEvent
- change default scrub count
- add preference for default symbol dir
- add preference for display of section cut line
This commit is contained in:
wandererfan
2024-05-17 18:31:36 -04:00
committed by WandererFan
parent 9decb98c71
commit 55968bbf6c
20 changed files with 574 additions and 442 deletions

View File

@@ -435,13 +435,14 @@ void CmdTechDrawView::activated(int iMsg)
}
}
QString filename = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(),
QObject::tr("Select a SVG or Image file to open"), QString(),
QString filename = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(),
QObject::tr("Select a SVG or Image file to open"),
Preferences::defaultSymbolDir(),
QString::fromLatin1("%1 (*.svg *.svgz *.jpg *.jpeg *.png *.bmp);;%2 (*.*)")
.arg(QObject::tr("SVG or Image files"), QObject::tr("All Files")));
if (!filename.isEmpty()) {
if (filename.endsWith(QString::fromLatin1(".svg"), Qt::CaseInsensitive)
if (filename.endsWith(QString::fromLatin1(".svg"), Qt::CaseInsensitive)
|| filename.endsWith(QString::fromLatin1(".svgz"), Qt::CaseInsensitive)) {
std::string FeatName = getUniqueObjectName("Symbol");
filename = Base::Tools::escapeEncodeFilename(filename);
@@ -1501,7 +1502,8 @@ void CmdTechDrawSymbol::activated(int iMsg)
// Reading an image
QString filename = Gui::FileDialog::getOpenFileName(
Gui::getMainWindow(), QObject::tr("Choose an SVG file to open"), QString(),
Gui::getMainWindow(), QObject::tr("Choose an SVG file to open"),
Preferences::defaultSymbolDir(),
QString::fromLatin1("%1 (*.svg *.svgz);;%2 (*.*)")
.arg(QObject::tr("Scalable Vector Graphic"), QObject::tr("All Files")));