Add some time to unlock sprite to select layer bounds

This commit is contained in:
David Capello 2018-03-29 18:53:03 -03:00
parent 498ffcbaae
commit d55e00aea0

View File

@ -11,6 +11,7 @@
#include "app/util/layer_boundaries.h" #include "app/util/layer_boundaries.h"
#include "app/cmd/set_mask.h" #include "app/cmd/set_mask.h"
#include "app/console.h"
#include "app/context_access.h" #include "app/context_access.h"
#include "app/modules/gui.h" #include "app/modules/gui.h"
#include "app/transaction.h" #include "app/transaction.h"
@ -94,7 +95,8 @@ void select_layer_boundaries(Layer* layer,
} }
} }
ContextWriter writer(UIContext::instance()); try {
ContextWriter writer(UIContext::instance(), 500);
app::Document* doc = writer.document(); app::Document* doc = writer.document();
Sprite* spr = layer->sprite(); Sprite* spr = layer->sprite();
ASSERT(doc == spr->document()); ASSERT(doc == spr->document());
@ -127,5 +129,9 @@ void select_layer_boundaries(Layer* layer,
doc->generateMaskBoundaries(); doc->generateMaskBoundaries();
update_screen_for_document(doc); update_screen_for_document(doc);
} }
catch (base::Exception& e) {
Console::showException(e);
}
}
} // namespace app } // namespace app