Fix error using filters when the selection is outside the canvas and is hidden/deselected (fix #1737)

This commit is contained in:
David Capello 2018-05-24 15:25:41 -03:00
parent 0f51467768
commit 31dcd3272a
2 changed files with 4 additions and 2 deletions

View File

@ -427,7 +427,9 @@ doc::PalettePicks FilterManagerImpl::getPalettePicks()
void FilterManagerImpl::init(Cel* cel)
{
ASSERT(cel);
if (!updateBounds(static_cast<app::Document*>(m_site.document())->mask()))
Document* doc = static_cast<app::Document*>(m_site.document());
if (!updateBounds(doc->isMaskVisible() ? doc->mask(): nullptr))
throw InvalidAreaException();
m_cel = cel;

View File

@ -44,7 +44,7 @@ namespace app {
class InvalidAreaException : public base::Exception {
public:
InvalidAreaException() throw()
: base::Exception("The current mask/area to apply the effect is completely invalid.") { }
: base::Exception("The active selection to apply the effect is out of the canvas.") { }
};
class NoImageException : public base::Exception {