Fix #3891 S/S Contents not displayed at load

- DrawViewSpreadsheet is empty after document load. Requires
  recompute to display s/s contents.
This commit is contained in:
wandererfan
2019-03-09 17:41:43 -05:00
parent 6363c90a20
commit ba6092502c

View File

@@ -63,7 +63,7 @@ DrawViewSpreadsheet::DrawViewSpreadsheet(void)
std::string fontName = hGrp->GetASCII("LabelFont", "osifont");
ADD_PROPERTY_TYPE(Source ,(0),vgroup,App::Prop_None,"Spreadsheet to view");
Source.setScope(App::LinkScope::Global);
Source.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(CellStart ,("A1"),vgroup,App::Prop_None,"The top left cell of the range to display");
ADD_PROPERTY_TYPE(CellEnd ,("B2"),vgroup,App::Prop_None,"The bottom right cell of the range to display");
ADD_PROPERTY_TYPE(Font ,((fontName.c_str())),vgroup,App::Prop_None,"The name of the font to use");
@@ -158,6 +158,8 @@ std::string DrawViewSpreadsheet::getSheetImage(void)
std::stringstream result;
App::DocumentObject* link = Source.getValue();
link->recomputeFeature(); //make sure s/s is up to date
std::string scellstart = CellStart.getValue();
std::string scellend = CellEnd.getValue();