[aseprite] 158/308: Fix regression: Show left/right mouse button triggers in keyboard shortcuts

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:45:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit c8abf0cfc704b5423a780891c6d6cc1d8d605b04
Author: David Capello <davidcapello at gmail.com>
Date:   Sat Dec 26 14:52:29 2015 -0300

    Fix regression: Show left/right mouse button triggers in keyboard shortcuts
---
 data/gui.xml                      |  4 ++++
 src/app/ui/keyboard_shortcuts.cpp | 22 +++++++++-------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/data/gui.xml b/data/gui.xml
index ae1eb73..1c81437 100644
--- a/data/gui.xml
+++ b/data/gui.xml
@@ -453,6 +453,10 @@
 
       <!-- Modifiers for freehand tool controller  -->
       <key action="StraightLineFromLastPoint" shortcut="Shift" />
+
+      <!-- Without default shortcuts -->
+      <key action="LeftMouseButton" />
+      <key action="RightMouseButton" />
     </actions>
 
   </keyboard>
diff --git a/src/app/ui/keyboard_shortcuts.cpp b/src/app/ui/keyboard_shortcuts.cpp
index b8412c7..7089f9f 100644
--- a/src/app/ui/keyboard_shortcuts.cpp
+++ b/src/app/ui/keyboard_shortcuts.cpp
@@ -375,13 +375,12 @@ void KeyboardShortcuts::importFile(TiXmlElement* rootElement, KeySource source)
     const char* tool_key = get_shortcut(xmlKey);
     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);
       if (tool) {
-        LOG(" - Shortcut for tool `%s': <%s>\n", tool_id, tool_key);
-
         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);
 
           if (!removed)
@@ -404,13 +403,12 @@ void KeyboardShortcuts::importFile(TiXmlElement* rootElement, KeySource source)
     const char* tool_key = get_shortcut(xmlKey);
     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);
       if (tool) {
-        LOG(" - Shortcut for quicktool `%s': <%s>\n", tool_id, tool_key);
-
         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);
 
           if (!removed)
@@ -433,14 +431,12 @@ void KeyboardShortcuts::importFile(TiXmlElement* rootElement, KeySource source)
     const char* tool_key = get_shortcut(xmlKey);
     bool removed = bool_attr_is_true(xmlKey, "removed");
 
-    if (tool_action && tool_key) {
-      LOG(" - Shortcut for sprite editor `%s': <%s>\n", tool_action, tool_key);
-
+    if (tool_action) {
       KeyAction action = base::convert_to<KeyAction, std::string>(tool_action);
-
       if (action != KeyAction::None) {
         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);
 
           if (!removed)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list