[TD] make LineGroup selectable

At the moment one has to specify the LineGroup as string. But one doesn't know what groups exist. So one has to check the Wiki, learn there where the groups are defined and then open the definition file with a text editor.

This PR simplifies this by reading the existing groups out of the definition file and fill the combobox accordingly.
It also give the user info what the selected LineGroup defines via the tooltip.

A nice side effect is that no typos can occur since you don't have to enter the LineGroup name as text.
This commit is contained in:
donovaly
2020-11-27 03:52:53 +01:00
committed by wwmayer
parent 23273c42db
commit 4bae944950
18 changed files with 148 additions and 91 deletions

View File

@@ -88,8 +88,8 @@ ViewProviderViewPart::ViewProviderViewPart()
static const char *hgroup = "Highlight";
//default line weights
std::string lgName = Preferences::lineGroup();
auto lg = TechDraw::LineGroup::lineGroupFactory(lgName);
int lgNumber = Preferences::lineGroup();
auto lg = TechDraw::LineGroup::lineGroupFactory(lgNumber);
double weight = lg->getWeight("Thick");
ADD_PROPERTY_TYPE(LineWidth,(weight),group,App::Prop_None,"The thickness of visible lines (line groups xx.2");