[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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user