Merge pull request #4068 from aapo-aapo/TD-Spreadsheet-fix
[TD] TechDraw DrawViewSpreadsheet fix
This commit is contained in:
@@ -372,6 +372,15 @@ void DrawPage::updateAllViews()
|
||||
line->recomputeFeature();
|
||||
}
|
||||
}
|
||||
|
||||
//fourth, try to execute all spreadsheets.
|
||||
for (it = featViews.begin(); it != featViews.end(); ++it) {
|
||||
TechDraw::DrawViewSpreadsheet *sheet = dynamic_cast<TechDraw::DrawViewSpreadsheet *>(*it);
|
||||
if (sheet != nullptr) {
|
||||
sheet->recomputeFeature();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<App::DocumentObject*> DrawPage::getAllViews(void)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyFile.h>
|
||||
#include <Mod/TechDraw/App/DrawViewPart.h>
|
||||
#include <Mod/TechDraw/App/DrawViewSpreadsheet.h>
|
||||
|
||||
namespace TechDraw
|
||||
{
|
||||
|
||||
@@ -211,13 +211,6 @@ std::string DrawViewSpreadsheet::getSheetImage(void)
|
||||
}
|
||||
}
|
||||
|
||||
//check for logical range
|
||||
if ( (sColStart > sColEnd) ||
|
||||
(iRowStart > iRowEnd) ) {
|
||||
Base::Console().Error("%s - cell range is illogical\n",getNameInDocument());
|
||||
return result.str();
|
||||
}
|
||||
|
||||
std::vector<std::string> availcolumns = getAvailColumns();
|
||||
|
||||
//validate range start column in sheet's available columns
|
||||
@@ -236,6 +229,13 @@ std::string DrawViewSpreadsheet::getSheetImage(void)
|
||||
return result.str();
|
||||
}
|
||||
|
||||
//check for logical range
|
||||
if ( (iAvailColStart > iAvailColEnd) ||
|
||||
(iRowStart > iRowEnd) ) {
|
||||
Base::Console().Error("%s - cell range is illogical\n",getNameInDocument());
|
||||
return result.str();
|
||||
}
|
||||
|
||||
// build row and column ranges
|
||||
std::vector<std::string> validColNames;
|
||||
std::vector<int> validRowNumbers;
|
||||
|
||||
Reference in New Issue
Block a user