Author: Nikita Kitaev <[email protected]>
Date:   Wed Jun  8 21:49:37 2011 -0700

Refactor zoom into Duckmatic

---

 synfig-studio/src/gui/duckmatic.cpp |    1 +
 synfig-studio/src/gui/duckmatic.h   |    3 +++
 synfig-studio/src/gui/workarea.cpp  |    1 -
 synfig-studio/src/gui/workarea.h    |    3 +--
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/synfig-studio/src/gui/duckmatic.cpp 
b/synfig-studio/src/gui/duckmatic.cpp
index 4b8fe6c..63a15ac 100644
--- a/synfig-studio/src/gui/duckmatic.cpp
+++ b/synfig-studio/src/gui/duckmatic.cpp
@@ -104,6 +104,7 @@ 
Duckmatic::Duckmatic(etl::loose_handle<synfigapp::CanvasInterface> canvas_interf
        drag_offset_=Point(0,0);
        clear_duck_dragger();
        clear_bezier_dragger();
+       zoom=prev_zoom=1.0;
 }
 
 Duckmatic::~Duckmatic()
diff --git a/synfig-studio/src/gui/duckmatic.h 
b/synfig-studio/src/gui/duckmatic.h
index 27a19e6..42ff25f 100644
--- a/synfig-studio/src/gui/duckmatic.h
+++ b/synfig-studio/src/gui/duckmatic.h
@@ -244,6 +244,9 @@ protected:
        /*! \see grid_snap, show_grid */
        synfig::Vector grid_size;
 
+       float zoom;                                     //!< Zoom factor
+       float prev_zoom;                        //!< Previous Zoom factor
+
        bool show_persistent_strokes;
 
        bool axis_lock;
diff --git a/synfig-studio/src/gui/workarea.cpp 
b/synfig-studio/src/gui/workarea.cpp
index d13e6ce..327bb63 100644
--- a/synfig-studio/src/gui/workarea.cpp
+++ b/synfig-studio/src/gui/workarea.cpp
@@ -670,7 +670,6 @@ 
WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        allow_bezier_clicks=true;
        allow_layer_clicks=true;
        render_idle_func_id=0;
-       zoom=prev_zoom=1.0;
        quality=10;
        low_res_pixel_size=2;
        rendering=false;
diff --git a/synfig-studio/src/gui/workarea.h b/synfig-studio/src/gui/workarea.h
index a634d21..713f151 100644
--- a/synfig-studio/src/gui/workarea.h
+++ b/synfig-studio/src/gui/workarea.h
@@ -167,8 +167,7 @@ private:
        synfig::Real    canvasheight;   //!< Height of the canvas
        synfig::Real    pw;                             //!< The width of a 
pixel
        synfig::Real    ph;                             //!< The height of a 
pixel
-       float zoom;                                     //!< Zoom factor
-       float prev_zoom;                        //!< Previous Zoom factor
+       // float zoom, prev_zoom are declared in Duckmatic
        synfig::Point window_tl;                //!< The (theoretical) top-left 
corner of the view window
        synfig::Point window_br;                //!< The (theoretical) 
bottom-right corner of the view window
 


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to