+ fixes #0001334: Applying extrude does not close the task
This commit is contained in:
parent
d5ed1b1b65
commit
68c8d98e4b
|
@ -54,6 +54,7 @@ DlgExtrusion::DlgExtrusion(QWidget* parent, Qt::WFlags fl)
|
|||
: QDialog(parent, fl), ui(new Ui_DlgExtrusion)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->statusLabel->clear();
|
||||
ui->labelNormal->hide();
|
||||
ui->viewButton->hide();
|
||||
ui->dirLen->setMinimumWidth(55); // needed to show all digits
|
||||
|
@ -214,16 +215,25 @@ void DlgExtrusion::apply()
|
|||
|
||||
activeDoc->commitTransaction();
|
||||
try {
|
||||
ui->statusLabel->clear();
|
||||
activeDoc->recompute();
|
||||
ui->statusLabel->setText(QString::fromAscii
|
||||
("<span style=\" color:#55aa00;\">%1</span>").arg(tr("Suceeded")));
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
ui->statusLabel->setText(QString::fromAscii
|
||||
("<span style=\" color:#ff0000;\">%1</span>").arg(tr("Failed")));
|
||||
Base::Console().Error("%s\n", e.what());
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
ui->statusLabel->setText(QString::fromAscii
|
||||
("<span style=\" color:#ff0000;\">%1</span>").arg(tr("Failed")));
|
||||
Base::Console().Error("%s\n", e.what());
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().Error("General error while extruding\n");
|
||||
ui->statusLabel->setText(QString::fromAscii
|
||||
("<span style=\" color:#ff0000;\">%1</span>").arg(tr("Failed")));
|
||||
Base::Console().Error("General error in extrusion\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,6 +268,11 @@ bool TaskExtrusion::accept()
|
|||
return (widget->result() == QDialog::Accepted);
|
||||
}
|
||||
|
||||
bool TaskExtrusion::reject()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void TaskExtrusion::clicked(int id)
|
||||
{
|
||||
if (id == QDialogButtonBox::Apply) {
|
||||
|
|
|
@ -65,10 +65,11 @@ public:
|
|||
|
||||
public:
|
||||
bool accept();
|
||||
bool reject();
|
||||
void clicked(int);
|
||||
|
||||
virtual QDialogButtonBox::StandardButtons getStandardButtons() const
|
||||
{ return QDialogButtonBox::Apply | QDialogButtonBox::Close; }
|
||||
{ return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Close; }
|
||||
|
||||
private:
|
||||
DlgExtrusion* widget;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>260</width>
|
||||
<height>504</height>
|
||||
<height>545</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -235,6 +235,13 @@
|
|||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="statusLabel">
|
||||
<property name="text">
|
||||
<string notr="true">StatusLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
|
Loading…
Reference in New Issue
Block a user