[aseprite] 48/134: Do not center editor scroll by default when we zoom with keys or zoom tool

Tobias Hansen thansen at moszumanska.debian.org
Sat Mar 14 17:10:02 UTC 2015


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

thansen pushed a commit to branch master
in repository aseprite.

commit cd913f76199cfc76dd836f28d29ad40e3b8b152a
Author: David Capello <davidcapello at gmail.com>
Date:   Fri Nov 7 19:11:23 2014 -0300

    Do not center editor scroll by default when we zoom with keys or zoom tool
---
 data/widgets/options.xml         | 1 +
 src/app/commands/cmd_options.cpp | 5 +++++
 src/app/ui/editor/editor.cpp     | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/data/widgets/options.xml b/data/widgets/options.xml
index c26a9c3..520610e 100644
--- a/data/widgets/options.xml
+++ b/data/widgets/options.xml
@@ -23,6 +23,7 @@
           </hbox>
           <check text="Show timeline automatically" id="autotimeline" tooltip="Show the timeline automatically
when a new frame or layer is added." />
           <check text="Expand menu bar items on mouseover" id="expand_menubar_on_mouseover" tooltip="Check this option to get
this old menus behavior." />
+          <check text="Center editor when zoom with keys or zoom tool" id="center_on_zoom" />
           <separator horizontal="true" />
           <link id="locate_file" text="Locate Configuration File" />
           <link id="locate_crash_folder" text="Locate Crash Folder" />
diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp
index bc65156..2231beb 100644
--- a/src/app/commands/cmd_options.cpp
+++ b/src/app/commands/cmd_options.cpp
@@ -78,6 +78,9 @@ public:
         ui::MenuBar::expandOnMouseover()))
       expandMenubarOnMouseover()->setSelected(true);
 
+    if (get_config_bool("Editor", "CenterOnZoom", false))
+      centerOnZoom()->setSelected(true);
+
     if (m_settings->experimental()->useNativeCursor())
       nativeCursor()->setSelected(true);
 
@@ -154,6 +157,8 @@ public:
     set_config_bool("Options", "ExpandMenuBarOnMouseover", expandOnMouseover);
     ui::MenuBar::setExpandOnMouseover(expandOnMouseover);
 
+    set_config_bool("Editor", "CenterOnZoom", centerOnZoom()->isSelected());
+
     m_settings->setShowSpriteEditorScrollbars(showScrollbars()->isSelected());
     m_settings->setZoomWithScrollWheel(wheelZoom()->isSelected());
     m_settings->setRightClickMode(static_cast<RightClickMode>(rightClickBehavior()->getSelectedItemIndex()));
diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index e49b09f..f1be12a 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -1305,7 +1305,7 @@ void Editor::setZoomAndCenterInMouse(int zoom, int mouse_x, int mouse_y, ZoomBeh
 
   switch (zoomBehavior) {
     case kCofiguredZoomBehavior:
-      centerMouse = get_config_bool("Editor", "CenterMouseInZoom", true);
+      centerMouse = get_config_bool("Editor", "CenterOnZoom", false);
       break;
     case kCenterOnZoom:
       centerMouse = true;

-- 
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