diagnostics

Some diagnostics to let me see what happens
This commit is contained in:
balazs-bamer
2015-01-16 12:02:40 +01:00
committed by wmayer
parent 405fa9c39a
commit 486578e5b3
2 changed files with 18 additions and 11 deletions

View File

@@ -45,10 +45,10 @@
using namespace SurfaceGui;
//#undef CS_FUTURE // multi-threading causes some problems
namespace SurfaceGui {
PROPERTY_SOURCE(SurfaceGui::ViewProviderBSurf, PartGui::ViewProviderPart)
namespace SurfaceGui {
bool ViewProviderBSurf::setEdit(int ModNum)
{
// When double-clicking on the item for this sketch the
@@ -94,12 +94,15 @@ BSurf::~BSurf()
filltype_t BSurf::getFillType() const
{
filltype_t ret;
if (ui->fillType_stretch->isChecked())
return StretchStyle;
ret = StretchStyle;
else if (ui->fillType_coons->isChecked())
return CoonsStyle;
ret = CoonsStyle;
else
return CurvedStyle;
ret = CurvedStyle;
printf("BSurf::getFillType: %d\n", ret);
return ret;
}
void BSurf::changeEvent(QEvent *e)
@@ -114,6 +117,7 @@ void BSurf::changeEvent(QEvent *e)
void BSurf::accept()
{
printf("accept ");
apply();
QDialog::accept();
}
@@ -128,14 +132,17 @@ void BSurf::apply()
void BSurf::on_fillType_stretch_clicked()
{
printf("stretch\n");
}
void BSurf::on_fillType_coons_clicked()
{
printf("coons\n");
}
void BSurf::on_fillType_curved_clicked()
{
printf("curved\n");
}
// ---------------------------------------

View File

@@ -241,14 +241,14 @@ CmdSurfaceBSpline::CmdSurfaceBSpline()
void CmdSurfaceBSpline::activated(int iMsg)
{
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
/*Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
if (!dlg) {
dlg = new SurfaceGui::TaskBSurf(new SurfaceGui::ViewProviderBSurf());
}
Gui::Control().showDialog(dlg);
Gui::Control().showDialog(dlg);*/
// we take the whole selection and require that all of its members are of the required curve
/* std::vector<Gui::SelectionObject> Selo = getSelection().getSelectionEx(0);
std::vector<Gui::SelectionObject> Selo = getSelection().getSelectionEx(0);
std::string FeatName = getUniqueObjectName("BSplineSurface");
std::stringstream bspListCmd;
bspListCmd << "FreeCAD.ActiveDocument.ActiveObject.aBList = [";
@@ -259,11 +259,11 @@ void CmdSurfaceBSpline::activated(int iMsg)
openCommand("Create BSpline surface");
doCommand(Doc,"FreeCAD.ActiveDocument.addObject(\"Surface::BSplineSurf\",\"%s\")", FeatName.c_str());
doCommand(Doc, "FreeCAD.ActiveDocument.ActiveObject.filltype=1"); // TODO ask filltype from user and check it
// doCommand(Doc, "Gui.ActiveDocument.setEdit('%s',0)", FeatName.c_str());
doCommand(Doc, "FreeCAD.ActiveDocument.ActiveObject.filltype=1");
doCommand(Doc, "Gui.ActiveDocument.setEdit('%s',0)", FeatName.c_str());
runCommand(Doc, bspListCmd.str().c_str());
updateActive();
commitCommand();*/
commitCommand();
}
bool CmdSurfaceBSpline::isActive(void)