Refactor code in DrawViewDimension::getRefType() shorter and simpler. No functional change except subelement sizes > 3 are supported, even though they are not supposed to happen.
This commit is contained in:
@@ -99,12 +99,7 @@ void TaskLinkDim::loadAvailDims()
|
||||
std::vector<App::DocumentObject*> pageViews = m_page->Views.getValues();
|
||||
std::vector<App::DocumentObject*>::iterator itView = pageViews.begin();
|
||||
std::string result;
|
||||
int selRefType = 0; //invalidRef;
|
||||
if (m_subs.size() == 1) {
|
||||
selRefType = TechDraw::DrawViewDimension::getRefType1(m_subs[0]);
|
||||
} else {
|
||||
selRefType = TechDraw::DrawViewDimension::getRefType2(m_subs[0],m_subs[1]);
|
||||
}
|
||||
int selRefType = TechDraw::DrawViewDimension::getRefTypeSubElements(m_subs);
|
||||
int found = 0;
|
||||
for (; itView != pageViews.end(); itView++) {
|
||||
if ((*itView)->isDerivedFrom(TechDraw::DrawViewDimension::getClassTypeId())) {
|
||||
|
||||
Reference in New Issue
Block a user