Double-click opens the slice properties dialog w/Slice tool

This commit is contained in:
David Capello 2019-05-07 10:33:05 -03:00
parent e8716cbb6e
commit 0c6e8de9e5

View File

@ -409,6 +409,17 @@ bool StandbyState::onDoubleClick(Editor* editor, MouseMessage* msg)
UIContext::instance()->executeCommand(selectTileCmd, params);
return true;
}
// Show slice properties when we double-click it
else if (ink->isSlice()) {
EditorHit hit = editor->calcHit(msg->position());
if (hit.slice()) {
Command* cmd = Commands::instance()->byId(CommandId::SliceProperties());
Params params;
params.set("id", base::convert_to<std::string>(hit.slice()->id()).c_str());
UIContext::instance()->executeCommand(cmd, params);
return true;
}
}
return false;
}