Add thickness function
This commit is contained in:
@@ -67,6 +67,8 @@ public:
|
||||
OffsetWidget::OffsetWidget(Part::Offset* offset, QWidget* parent)
|
||||
: d(new Private())
|
||||
{
|
||||
if (!Gui::Command::hasPendingCommand())
|
||||
Gui::Command::openCommand("Edit offset");
|
||||
Gui::Application::Instance->runPythonCode("from FreeCAD import Base");
|
||||
Gui::Application::Instance->runPythonCode("import Part");
|
||||
|
||||
@@ -75,6 +77,7 @@ OffsetWidget::OffsetWidget(Part::Offset* offset, QWidget* parent)
|
||||
d->ui.spinOffset->setValue(d->offset->Value.getValue());
|
||||
d->ui.spinOffset->setRange(-INT_MAX, INT_MAX);
|
||||
d->ui.spinOffset->setSingleStep(0.1);
|
||||
d->ui.facesButton->hide();
|
||||
}
|
||||
|
||||
OffsetWidget::~OffsetWidget()
|
||||
@@ -177,6 +180,7 @@ bool OffsetWidget::reject()
|
||||
// roll back the done things
|
||||
Gui::Command::abortCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
Gui::Command::updateActive();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user