Fix critical warnings

This commit is contained in:
wmayer
2012-06-13 18:49:10 +02:00
parent 7cb404f62f
commit 8a94ba885c
19 changed files with 204 additions and 199 deletions

View File

@@ -263,7 +263,7 @@ std::string ProjectionAlgos::getDXF(SvgExtractionType type, float scale)
<< "ENTITIES" << endl;
if (!H.IsNull() && (type & WithHidden)) {
float width = 0.15f/scale;
//float width = 0.15f/scale;
BRepMesh::Mesh(H,0.1);
result //<< "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -278,7 +278,7 @@ std::string ProjectionAlgos::getDXF(SvgExtractionType type, float scale)
//<< "</g>" << endl;
}
if (!HO.IsNull() && (type & WithHidden)) {
float width = 0.15f/scale;
//float width = 0.15f/scale;
BRepMesh::Mesh(HO,0.1);
result //<< "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -293,7 +293,7 @@ std::string ProjectionAlgos::getDXF(SvgExtractionType type, float scale)
//<< "</g>" << endl;
}
if (!VO.IsNull()) {
float width = 0.35f/scale;
//float width = 0.35f/scale;
BRepMesh::Mesh(VO,0.1);
result //<< "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -309,8 +309,7 @@ std::string ProjectionAlgos::getDXF(SvgExtractionType type, float scale)
//<< "</g>" << endl;
}
if (!V.IsNull()) {
float width = 0.35f/scale;
//float width = 0.35f/scale;
BRepMesh::Mesh(V,0.1);
result //<< "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -326,7 +325,7 @@ std::string ProjectionAlgos::getDXF(SvgExtractionType type, float scale)
}
if (!V1.IsNull() && (type & WithSmooth)) {
float width = 0.35f/scale;
//float width = 0.35f/scale;
BRepMesh::Mesh(V1,0.1);
result //<< "<g"
@@ -342,8 +341,7 @@ std::string ProjectionAlgos::getDXF(SvgExtractionType type, float scale)
//<< "</g>" << endl;
}
if (!H1.IsNull() && (type & WithSmooth) && (type & WithHidden)) {
float width = 0.15f/scale;
//float width = 0.15f/scale;
BRepMesh::Mesh(H1,0.1);
result //<< "<g"
//<< " id=\"" << ViewName << "\"" << endl

View File

@@ -34,7 +34,7 @@
#include <Gui/Command.h>
#include <Base/BoundBoxPy.h>
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Drawing/App/FeaturePage.h>
#include <Mod/Drawing/App/FeaturePage.h>
#include <Base/FileInfo.h>
#include <iostream>
@@ -301,7 +301,7 @@ TaskOrthoViews::TaskOrthoViews(QWidget *parent)
App::Document* doc = App::GetApplication().getActiveDocument();
std::vector<App::DocumentObject*> pages = doc->getObjectsOfType(Drawing::FeaturePage::getClassTypeId());
std::string PageName = pages.front()->getNameInDocument();
std::string PageName = pages.front()->getNameInDocument();
const char * page = PageName.c_str();
App::DocumentObject * this_page = doc->getObject(page);
@@ -409,7 +409,7 @@ TaskOrthoViews::TaskOrthoViews(QWidget *parent)
data[1] = &x_pos;
data[2] = &y_pos;
data[3] = &horiz;
data[4] = &vert;
data[4] = &vert;
// Command::doCommand(Command::Doc,"#%d", map1[2][2][1]);
@@ -636,24 +636,24 @@ void TaskOrthoViews::compute()
void TaskOrthoViews::validate_cbs()
{
for (int i=0; i < 5; i++)
for (int j=0; j < 5; j++)
if ((abs(i-2) + abs(j-2)) < 3) //if i,j combination corresponds to valid check box, then proceed with:
for (int i=0; i < 5; i++) {
for (int j=0; j < 5; j++) {
if ((abs(i-2) + abs(j-2)) < 3) { //if i,j combination corresponds to valid check box, then proceed with:
if (view_count == 0)
{
c_boxes[i][j]->setEnabled(false);
c_boxes[i][j]->setChecked(false);
}
else if (!c_boxes[i][j]->isChecked()) //only questions boxes 'enableability' if it's not checked
if (view_count == 4)
else if (!c_boxes[i][j]->isChecked()) { //only questions boxes 'enableability' if it's not checked
if (view_count == 4) {
c_boxes[i][j]->setEnabled(false); //if there are four checked boxes then all others are disabled
else
{
if ((abs(i-2) + abs(j-2)) == 1) //only true for boxes immediately up/down/left/right of centre
}
else {
if ((abs(i-2) + abs(j-2)) == 1) { //only true for boxes immediately up/down/left/right of centre
c_boxes[i][j]->setEnabled(c_boxes[2][2]->isChecked()); //which are enabled if centre box is checked
else
{
}
else {
int di = ((i-2) < 0) - ((i-2) > 0); //which direction is towards centre?
int dj = ((j-2) < 0) - ((j-2) > 0);
@@ -668,9 +668,12 @@ void TaskOrthoViews::validate_cbs()
c_boxes[i][j]->setEnabled(false);
}
}
}
}
}
}
}
void TaskOrthoViews::cb_toggled(bool toggle)
{
QString name = sender()->objectName().right(2);