mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Bazaar/DXF : another fix for linetypes
git-svn-id: svn://ultimatepp.org/upp/trunk@5275 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bc986eac30
commit
2539ab8e37
1 changed files with 7 additions and 5 deletions
|
|
@ -37,8 +37,9 @@ DXFLayer &DXFLayer::SetColor(int c)
|
|||
|
||||
DXFLayer &DXFLayer::SetLineType(String const <)
|
||||
{
|
||||
// add the linetype (just dummy if already there...)
|
||||
tables->AddLineType(lt);
|
||||
// add the linetype if needed
|
||||
if(!tables->HasLineType(lt))
|
||||
tables->AddLineType(lt);
|
||||
|
||||
lineType = lt;
|
||||
return *this;
|
||||
|
|
@ -202,8 +203,9 @@ uint64 DXFTables::GetNextHandle(void)
|
|||
// adds a layer
|
||||
DXFLayer &DXFTables::AddLayer(String const &name, int color, String const &lType)
|
||||
{
|
||||
// add the linetype (just dummy if already there...)
|
||||
AddLineType(lType);
|
||||
// add the linetype if needed
|
||||
if(!HasLineType(lType))
|
||||
AddLineType(lType);
|
||||
|
||||
int layIdx = layers.Find(ToUpper(name));
|
||||
if(layIdx >= 0)
|
||||
|
|
@ -237,7 +239,7 @@ DXFLayer &DXFTables::GetLayer(String const &name)
|
|||
// adds a linetype
|
||||
DXFLineType &DXFTables::AddLineType(String const &name, Vector<double> const &elements)
|
||||
{
|
||||
int ltIdx = lineTypes.Find(name);
|
||||
int ltIdx = lineTypes.Find(ToUpper(name));
|
||||
if(ltIdx >= 0)
|
||||
{
|
||||
lineTypes[ltIdx].elements <<= elements;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue