File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ TaskMaterial::TaskMaterial()
260260 taskbox->groupLayout ()->addWidget (widget);
261261 Content.push_back (taskbox);
262262
263- Gui::Command::openCommand (QT_TRANSLATE_NOOP (" Command" , " Set Material" ));
263+ tid = Gui::Command::openActiveDocumentCommand (QT_TRANSLATE_NOOP (" Command" , " Set Material" ));
264264}
265265
266266TaskMaterial::~TaskMaterial () = default ;
@@ -272,13 +272,13 @@ QDialogButtonBox::StandardButtons TaskMaterial::getStandardButtons() const
272272
273273bool TaskMaterial::accept ()
274274{
275- Gui::Command::commitCommand ();
275+ Gui::Command::commitCommand (tid );
276276 return true ;
277277}
278278
279279bool TaskMaterial::reject ()
280280{
281- Gui::Command::abortCommand ();
281+ Gui::Command::abortCommand (tid );
282282 widget->reject ();
283283 return (widget->result () == QDialog::Rejected);
284284}
Original file line number Diff line number Diff line change 3030#include < vector>
3131
3232#include < App/Material.h>
33+ #include < App/TransactionDefs.h>
3334#include < Gui/Selection/Selection.h>
3435#include < Gui/TaskView/TaskDialog.h>
3536#include < Gui/TaskView/TaskView.h>
@@ -114,6 +115,7 @@ class TaskMaterial: public Gui::TaskView::TaskDialog
114115private:
115116 DlgMaterialImp* widget;
116117 Gui::TaskView::TaskBox* taskbox;
118+ int tid {App::NullTransaction};
117119};
118120
119121} // namespace MatGui
You can’t perform that action at this time.
0 commit comments