From 4b5ae54e8899fcde5999e4c34f4800d52fee85e0 Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Thu, 3 Dec 2015 21:36:21 +0100 Subject: [PATCH] App: Removed VariableExpression::setName(), and replace call by setPath(); it's use caused a crash (#2352). --- src/App/Expression.h | 2 -- src/Mod/Spreadsheet/App/PropertySheet.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/App/Expression.h b/src/App/Expression.h index 41d55ee1585a..c14cc310dd3d 100644 --- a/src/App/Expression.h +++ b/src/App/Expression.h @@ -349,8 +349,6 @@ class AppExport VariableExpression : public UnitExpression { void setPath(const ObjectIdentifier & path); - void setName(const std::string & name) { assert(0); } - void renameDocumentObject(const std::string & oldName, const std::string & newName); void renameDocument(const std::string &oldName, const std::string &newName); diff --git a/src/Mod/Spreadsheet/App/PropertySheet.cpp b/src/Mod/Spreadsheet/App/PropertySheet.cpp index 8d052bf8e557..c536a925bf73 100644 --- a/src/Mod/Spreadsheet/App/PropertySheet.cpp +++ b/src/Mod/Spreadsheet/App/PropertySheet.cpp @@ -579,7 +579,7 @@ class RewriteExpressionVisitor : public ExpressionVisitor { if (thisRow >= mRow || thisCol >= mCol) { thisRow += mRowCount; thisCol += mColCount; - varExpr->setName(columnName(thisCol) + rowName(thisRow)); + varExpr->setPath(ObjectIdentifier(varExpr->getOwner(), columnName(thisCol) + rowName(thisRow))); mChanged = true; } }