[TD]handle ProjectionAngle changes
This commit is contained in:
@@ -55,9 +55,9 @@
|
||||
|
||||
using namespace TechDraw;
|
||||
|
||||
const char* DrawProjGroup::ProjectionTypeEnums[] = {"Default",
|
||||
"First Angle",
|
||||
const char* DrawProjGroup::ProjectionTypeEnums[] = {"First Angle",
|
||||
"Third Angle",
|
||||
"Default", //Use Page setting
|
||||
NULL};
|
||||
|
||||
PROPERTY_SOURCE(TechDraw::DrawProjGroup, TechDraw::DrawViewCollection)
|
||||
@@ -779,7 +779,7 @@ int DrawProjGroup::getViewIndex(const char *viewTypeCStr) const
|
||||
Base::Console().Warning("DPG: %s - can not find parent page. Using default Projection Type. (1)\n",
|
||||
getNameInDocument());
|
||||
int projConv = getDefProjConv();
|
||||
projType = ProjectionTypeEnums[projConv + 1];
|
||||
projType = ProjectionTypeEnums[projConv];
|
||||
}
|
||||
} else {
|
||||
projType = ProjectionType.getValueAsString();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>460</width>
|
||||
<height>425</height>
|
||||
<height>440</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -470,6 +470,11 @@
|
||||
<string>Third</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Page</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
||||
@@ -109,7 +109,8 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) :
|
||||
connect(ui->sbScaleDen, SIGNAL(valueChanged(int)), this, SLOT(scaleManuallyChanged(int)));
|
||||
|
||||
// Slot for Projection Type (layout)
|
||||
connect(ui->projection, SIGNAL(currentIndexChanged(int)), this, SLOT(projectionTypeChanged(int)));
|
||||
// connect(ui->projection, SIGNAL(currentIndexChanged(int)), this, SLOT(projectionTypeChanged(int)));
|
||||
connect(ui->projection, SIGNAL(currentIndexChanged(QString)), this, SLOT(projectionTypeChanged(QString)));
|
||||
|
||||
m_page = multiView->findParentPage();
|
||||
Gui::Document* activeGui = Gui::Application::Instance->getDocument(m_page->getDocument());
|
||||
@@ -211,29 +212,23 @@ void TaskProjGroup::rotateButtonClicked(void)
|
||||
}
|
||||
}
|
||||
|
||||
void TaskProjGroup::projectionTypeChanged(int index)
|
||||
//void TaskProjGroup::projectionTypeChanged(int index)
|
||||
void TaskProjGroup::projectionTypeChanged(QString qText)
|
||||
{
|
||||
if(blockUpdate)
|
||||
if(blockUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(index == 0) {
|
||||
//layout per Page (Document)
|
||||
if (qText == QString::fromUtf8("Page")) {
|
||||
multiView->ProjectionType.setValue("Default");
|
||||
|
||||
} else if(index == 1) {
|
||||
// First Angle layout
|
||||
multiView->ProjectionType.setValue("First Angle");
|
||||
} else if(index == 2) {
|
||||
// Third Angle layout
|
||||
multiView->ProjectionType.setValue("Third Angle");
|
||||
} else {
|
||||
Base::Console().Log("Error - TaskProjGroup::projectionTypeChanged - unknown projection layout: %d\n",
|
||||
index);
|
||||
return;
|
||||
std::string text = qText.toStdString();
|
||||
multiView->ProjectionType.setValue(text.c_str());
|
||||
}
|
||||
|
||||
// Update checkboxes so checked state matches the drawing
|
||||
setupViewCheckboxes();
|
||||
multiView->recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskProjGroup::scaleTypeChanged(int index)
|
||||
|
||||
@@ -82,8 +82,8 @@ protected Q_SLOTS:
|
||||
void rotateButtonClicked(void);
|
||||
|
||||
// void onResetClicked(void);
|
||||
|
||||
void projectionTypeChanged(int index);
|
||||
/* void projectionTypeChanged(int index);*/
|
||||
void projectionTypeChanged(QString qText);
|
||||
void scaleTypeChanged(int index);
|
||||
void scaleManuallyChanged(int i);
|
||||
|
||||
|
||||
@@ -63,11 +63,9 @@
|
||||
<property name="editable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Page</string>
|
||||
</property>
|
||||
</item>
|
||||
<property name="currentText">
|
||||
<string>First Angle</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>First Angle</string>
|
||||
@@ -78,6 +76,11 @@
|
||||
<string>Third Angle</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Page</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user