[TD]fix default line width on empty config
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
#include <Mod/TechDraw/App/DrawUtil.h>
|
||||
#include <Mod/TechDraw/App/DrawViewPart.h>
|
||||
#include <Mod/TechDraw/App/LineGenerator.h>
|
||||
#include <Mod/TechDraw/App/LineGroup.h>
|
||||
#include <Mod/TechDraw/App/Preferences.h>
|
||||
|
||||
#include "DlgPageChooser.h"
|
||||
@@ -190,6 +191,23 @@ void DrawGuiUtil::loadLineStyleChoices(QComboBox* combo, LineGenerator* generato
|
||||
}
|
||||
}
|
||||
|
||||
void DrawGuiUtil::loadLineGroupChoices(QComboBox* combo)
|
||||
{
|
||||
combo->clear();
|
||||
std::string lgFileName = Preferences::lineGroupFile();
|
||||
std::string lgRecord = LineGroup::getGroupNamesFromFile(lgFileName);
|
||||
// split collected groups
|
||||
std::stringstream ss(lgRecord);
|
||||
std::vector<QString> lgNames;
|
||||
while (std::getline(ss, lgRecord, ',')) {
|
||||
lgNames.push_back(Base::Tools::fromStdString(lgRecord));
|
||||
}
|
||||
// fill the combobox with the found names
|
||||
for (auto& name : lgNames) {
|
||||
combo->addItem(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! make an icon that shows a sample of lineNumber in the current line standard
|
||||
QIcon DrawGuiUtil::iconForLine(size_t lineNumber,
|
||||
|
||||
Reference in New Issue
Block a user