Gui: fix warning -Wunused-parameter

The function PropertyEditor::recomputeDocument() accepts a pointer to App::Document that is passed by the calling instance closeTransaction().
Since this is the active document there is no need for PropertyEditor::recomputeDocument() to ignore the argument and determine the active document again.
This commit is contained in:
wmayer
2022-02-21 15:41:28 +01:00
parent 7b7a0aa4bf
commit ae2331b316

View File

@@ -307,13 +307,11 @@ void PropertyEditor::onItemActivated ( const QModelIndex & index )
void PropertyEditor::recomputeDocument(App::Document* doc)
{
try {
if (App::Document* doc = App::GetApplication().getActiveDocument()) {
if (!doc->isTransactionEmpty()) {
// Between opening and committing a transaction a recompute
// could already have been done
if (doc->isTouched())
doc->recompute();
}
if (doc && !doc->isTransactionEmpty()) {
// Between opening and committing a transaction a recompute
// could already have been done
if (doc->isTouched())
doc->recompute();
}
}
// do not re-throw