mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-26 00:19:13 +00:00
Arrow keys move the selection only when the current tool/ink is about selection
This fix a problem where arrow keys cleared the selection content when they were used with a non-selection tool.
This commit is contained in:
parent
0e7f424406
commit
2d8303e174
@ -157,10 +157,13 @@ static void save_gui_config();
|
||||
|
||||
static KeyContext get_current_keycontext()
|
||||
{
|
||||
DocumentLocation location = UIContext::instance()->activeLocation();
|
||||
Document* document = location.document();
|
||||
app::Context* ctx = UIContext::instance();
|
||||
DocumentLocation location = ctx->activeLocation();
|
||||
Document* doc = location.document();
|
||||
|
||||
if (document && document->isMaskVisible())
|
||||
if (doc &&
|
||||
doc->isMaskVisible() &&
|
||||
ctx->settings()->getCurrentTool()->getInk(0)->isSelection())
|
||||
return KeyContext::Selection;
|
||||
else
|
||||
return KeyContext::Normal;
|
||||
|
Loading…
Reference in New Issue
Block a user