Skip to content

Commit

Permalink
PaintOnTemplateFeature: Fix setupTemplate()
Browse files Browse the repository at this point in the history
Indicate that template configuration is finished before loading the
template file, so that that function takes care of setting the state
to Loaded on success.
Complements aee1057.
Fixes GH-1830 (Cannot add scribble template).
  • Loading branch information
dg0yt committed Dec 29, 2020
1 parent 36d6fb1 commit 53fa24a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/templates/paint_on_template_feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ Template* PaintOnTemplateFeature::setupTemplate() const
template_image->setTemplateScaleY(1.0/pixel_per_mm);
template_image->setTemplateShear(0);
template_image->setTemplateRotation(0);
template_image->setTemplateState(Template::Unloaded);
template_image->loadTemplateFile();

if (template_image->getTemplateState() != Template::Loaded)
Expand Down

0 comments on commit 53fa24a

Please sign in to comment.