Code

fix outline mode toggling with multiple views
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 11 Mar 2007 04:02:46 +0000 (04:02 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 11 Mar 2007 04:02:46 +0000 (04:02 +0000)
src/desktop.cpp

index 471ac2a1949474452e51b546fd7cf973f62d136c..d159fbc78d236df8f3996087c59092ea28bfc74f 100644 (file)
@@ -347,7 +347,6 @@ SPDesktop::~SPDesktop() {}
 
 void SPDesktop::setDisplayModeNormal()
 {
-    prefs_set_int_attribute("options.outlinemode", "value", 0);
     SP_CANVAS_ARENA (drawing)->arena->rendermode = RENDERMODE_NORMAL;
     canvas->rendermode = RENDERMODE_NORMAL; // canvas needs that for choosing the best buffer size
     displayMode = RENDERMODE_NORMAL;
@@ -357,7 +356,6 @@ void SPDesktop::setDisplayModeNormal()
 
 void SPDesktop::setDisplayModeOutline()
 {
-    prefs_set_int_attribute("options.outlinemode", "value", 1);
     SP_CANVAS_ARENA (drawing)->arena->rendermode = RENDERMODE_OUTLINE;
     canvas->rendermode = RENDERMODE_OUTLINE; // canvas needs that for choosing the best buffer size
     displayMode = RENDERMODE_OUTLINE;
@@ -367,7 +365,7 @@ void SPDesktop::setDisplayModeOutline()
 
 void SPDesktop::displayModeToggle()
 {
-    if (prefs_get_int_attribute("options.outlinemode", "value", prefs_get_int_attribute("options.startmode", "outline", 0)))
+    if (displayMode == RENDERMODE_OUTLINE)
         setDisplayModeNormal();
     else 
         setDisplayModeOutline();