summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index f58864955..e785aab6d 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -132,7 +132,6 @@ SPDesktop::SPDesktop() :
window_state(0),
interaction_disabled_counter( 0 ),
waiting_cursor( false ),
- perspectives (NULL),
guides_active( false ),
gr_item( 0 ),
gr_point_type( 0 ),
@@ -310,21 +309,6 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas)
layer_manager = new Inkscape::LayerManager( this );
grids_visible = true;
-
- /* Create initial perspective, append it to the list of existing perspectives
- and make it the current perspective */
- Box3D::Perspective3D *initial_persp = new Box3D::Perspective3D (
- // VP in x-direction
- Box3D::VanishingPoint( NR::Point(-50.0, 600.0),
- NR::Point( -1.0, 0.0), Box3D::VP_FINITE),
- // VP in y-direction
- Box3D::VanishingPoint( NR::Point(500.0,1000.0),
- NR::Point( 0.0, 1.0), Box3D::VP_INFINITE),
- // VP in z-direction
- Box3D::VanishingPoint( NR::Point(700.0, 600.0),
- NR::Point(sqrt(3.0),1.0), Box3D::VP_FINITE));
- this->add_perspective (initial_persp);
- Box3D::Perspective3D::current_perspective = (Box3D::Perspective3D *) perspectives->data;
}
@@ -368,11 +352,6 @@ void SPDesktop::destroy()
g_list_free (zooms_past);
g_list_free (zooms_future);
-
- for (GSList *p = this->perspectives; p != NULL; p = p->next) {
- delete ((Box3D::Perspective3D *) p->data);
- }
- g_slist_free (perspectives);
}
SPDesktop::~SPDesktop() {}
@@ -715,45 +694,6 @@ void SPDesktop::set_display_area(NR::Rect const &a, NR::Coord b, bool log)
}
/**
- * Add a perspective to the desktop if it doesn't exist yet
- */
-void
-SPDesktop::add_perspective (Box3D::Perspective3D * const persp)
-{
- // check that the perspective is not yet linked to another desktop
- if (persp->desktop != NULL) {
- g_assert (persp->desktop == this);
- }
-
- // FIXME: Should we handle the case that the perspectives have equal VPs but are not identical?
- // If so, we need to take care of relinking the boxes, etc.
- if (persp == NULL || g_slist_find (this->perspectives, persp)) return;
- this->perspectives = g_slist_prepend (this->perspectives, persp);
- persp->desktop = this;
-}
-
-void SPDesktop::remove_perspective (Box3D::Perspective3D * const persp)
-{
- if (persp == NULL) return;
- if (!g_slist_find (this->perspectives, persp)) {
- g_warning ("Could not find perspective in current desktop. Not removed.\n");
- return;
- }
- this->perspectives = g_slist_remove (this->perspectives, persp);
-}
-
-// find an existing perspective whose VPs are equal to those of persp
-Box3D::Perspective3D * SPDesktop::find_perspective (Box3D::Perspective3D * const persp)
-{
- for (GSList *p = this->perspectives; p != NULL; p = p->next) {
- if (*((Box3D::Perspective3D *) p->data) == *persp) {
- return ((Box3D::Perspective3D *) p->data);
- }
- }
- return NULL; // perspective was not found
-}
-
-/**
* Return viewbox dimensions.
*/
NR::Rect SPDesktop::get_display_area() const