mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Fix regression: Show left/right mouse button triggers in keyboard shortcuts
This commit is contained in:
parent
7b5827a151
commit
c8abf0cfc7
@ -453,6 +453,10 @@
|
|||||||
|
|
||||||
<!-- Modifiers for freehand tool controller -->
|
<!-- Modifiers for freehand tool controller -->
|
||||||
<key action="StraightLineFromLastPoint" shortcut="Shift" />
|
<key action="StraightLineFromLastPoint" shortcut="Shift" />
|
||||||
|
|
||||||
|
<!-- Without default shortcuts -->
|
||||||
|
<key action="LeftMouseButton" />
|
||||||
|
<key action="RightMouseButton" />
|
||||||
</actions>
|
</actions>
|
||||||
|
|
||||||
</keyboard>
|
</keyboard>
|
||||||
|
@ -375,13 +375,12 @@ void KeyboardShortcuts::importFile(TiXmlElement* rootElement, KeySource source)
|
|||||||
const char* tool_key = get_shortcut(xmlKey);
|
const char* tool_key = get_shortcut(xmlKey);
|
||||||
bool removed = bool_attr_is_true(xmlKey, "removed");
|
bool removed = bool_attr_is_true(xmlKey, "removed");
|
||||||
|
|
||||||
if (tool_id && tool_key) {
|
if (tool_id) {
|
||||||
tools::Tool* tool = App::instance()->getToolBox()->getToolById(tool_id);
|
tools::Tool* tool = App::instance()->getToolBox()->getToolById(tool_id);
|
||||||
if (tool) {
|
if (tool) {
|
||||||
LOG(" - Shortcut for tool `%s': <%s>\n", tool_id, tool_key);
|
|
||||||
|
|
||||||
Key* key = this->tool(tool);
|
Key* key = this->tool(tool);
|
||||||
if (key) {
|
if (key && tool_key) {
|
||||||
|
LOG(" - Shortcut for tool `%s': <%s>\n", tool_id, tool_key);
|
||||||
Accelerator accel(tool_key);
|
Accelerator accel(tool_key);
|
||||||
|
|
||||||
if (!removed)
|
if (!removed)
|
||||||
@ -404,13 +403,12 @@ void KeyboardShortcuts::importFile(TiXmlElement* rootElement, KeySource source)
|
|||||||
const char* tool_key = get_shortcut(xmlKey);
|
const char* tool_key = get_shortcut(xmlKey);
|
||||||
bool removed = bool_attr_is_true(xmlKey, "removed");
|
bool removed = bool_attr_is_true(xmlKey, "removed");
|
||||||
|
|
||||||
if (tool_id && tool_key) {
|
if (tool_id) {
|
||||||
tools::Tool* tool = App::instance()->getToolBox()->getToolById(tool_id);
|
tools::Tool* tool = App::instance()->getToolBox()->getToolById(tool_id);
|
||||||
if (tool) {
|
if (tool) {
|
||||||
LOG(" - Shortcut for quicktool `%s': <%s>\n", tool_id, tool_key);
|
|
||||||
|
|
||||||
Key* key = this->quicktool(tool);
|
Key* key = this->quicktool(tool);
|
||||||
if (key) {
|
if (key && tool_key) {
|
||||||
|
LOG(" - Shortcut for quicktool `%s': <%s>\n", tool_id, tool_key);
|
||||||
Accelerator accel(tool_key);
|
Accelerator accel(tool_key);
|
||||||
|
|
||||||
if (!removed)
|
if (!removed)
|
||||||
@ -433,14 +431,12 @@ void KeyboardShortcuts::importFile(TiXmlElement* rootElement, KeySource source)
|
|||||||
const char* tool_key = get_shortcut(xmlKey);
|
const char* tool_key = get_shortcut(xmlKey);
|
||||||
bool removed = bool_attr_is_true(xmlKey, "removed");
|
bool removed = bool_attr_is_true(xmlKey, "removed");
|
||||||
|
|
||||||
if (tool_action && tool_key) {
|
if (tool_action) {
|
||||||
LOG(" - Shortcut for sprite editor `%s': <%s>\n", tool_action, tool_key);
|
|
||||||
|
|
||||||
KeyAction action = base::convert_to<KeyAction, std::string>(tool_action);
|
KeyAction action = base::convert_to<KeyAction, std::string>(tool_action);
|
||||||
|
|
||||||
if (action != KeyAction::None) {
|
if (action != KeyAction::None) {
|
||||||
Key* key = this->action(action);
|
Key* key = this->action(action);
|
||||||
if (key) {
|
if (key && tool_key) {
|
||||||
|
LOG(" - Shortcut for action '%s': <%s>\n", tool_action, tool_key);
|
||||||
Accelerator accel(tool_key);
|
Accelerator accel(tool_key);
|
||||||
|
|
||||||
if (!removed)
|
if (!removed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user