issue #0002775: first build fails
This commit is contained in:
@@ -44,14 +44,9 @@
|
||||
|
||||
using namespace MeshGui;
|
||||
|
||||
/**
|
||||
* Constructs a MeshGui::DlgRegularSolidImp as a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*
|
||||
* The dialog will by default be modeless, unless you set 'modal' to
|
||||
* true to construct a modal dialog.
|
||||
*/
|
||||
MeshGui::DlgRegularSolidImp::DlgRegularSolidImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
/* TRANSLATOR MeshGui::DlgRegularSolidImp */
|
||||
|
||||
DlgRegularSolidImp::DlgRegularSolidImp(QWidget* parent, Qt::WindowFlags fl)
|
||||
: QDialog( parent, fl )
|
||||
{
|
||||
this->setupUi(this);
|
||||
@@ -104,32 +99,32 @@ MeshGui::DlgRegularSolidImp::DlgRegularSolidImp(QWidget* parent, Qt::WindowFlags
|
||||
/**
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
MeshGui::DlgRegularSolidImp::~DlgRegularSolidImp()
|
||||
DlgRegularSolidImp::~DlgRegularSolidImp()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
||||
void MeshGui::DlgRegularSolidImp::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
this->retranslateUi(this);
|
||||
}
|
||||
QDialog::changeEvent(e);
|
||||
}
|
||||
|
||||
void DlgRegularSolidImp::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
this->retranslateUi(this);
|
||||
}
|
||||
QDialog::changeEvent(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a mesh solid from the currently active solid type.
|
||||
*/
|
||||
void MeshGui::DlgRegularSolidImp::on_createSolidButton_clicked()
|
||||
void DlgRegularSolidImp::on_createSolidButton_clicked()
|
||||
{
|
||||
try {
|
||||
Gui::WaitCursor wc;
|
||||
QString cmd; std::string name;
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc) {
|
||||
QMessageBox::warning(this, tr("Create %1").arg(comboBox1->currentText()), tr("No active document"));
|
||||
return;
|
||||
}
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc) {
|
||||
QMessageBox::warning(this, tr("Create %1").arg(comboBox1->currentText()), tr("No active document"));
|
||||
return;
|
||||
}
|
||||
if (comboBox1->currentIndex() == 0) { // cube
|
||||
name = doc->getUniqueObjectName("Cube");
|
||||
cmd = QString(QLatin1String(
|
||||
@@ -210,14 +205,14 @@ void MeshGui::DlgRegularSolidImp::on_createSolidButton_clicked()
|
||||
.arg(toroidRadius2->value().getValue(),0,'f',Base::UnitsApi::getDecimals())
|
||||
.arg(toroidCount->value());
|
||||
}
|
||||
|
||||
// Execute the Python block
|
||||
|
||||
// Execute the Python block
|
||||
QString solid = tr("Create %1").arg(comboBox1->currentText());
|
||||
Gui::Application::Instance->activeDocument()->openCommand(solid.toUtf8());
|
||||
Gui::Application::Instance->activeDocument()->openCommand(solid.toUtf8());
|
||||
Gui::Command::doCommand(Gui::Command::Doc, (const char*)cmd.toLatin1());
|
||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().recompute()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.SendMsgToActiveView(\"ViewFit\")");
|
||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().recompute()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.SendMsgToActiveView(\"ViewFit\")");
|
||||
}
|
||||
catch (const Base::PyException& e) {
|
||||
QMessageBox::warning(this, tr("Create %1").arg(comboBox1->currentText()),
|
||||
|
||||
Reference in New Issue
Block a user