summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4af602b)
raw | patch | inline | side by side (parent: 4af602b)
author | scislac <scislac@users.sourceforge.net> | |
Mon, 21 Sep 2009 20:58:04 +0000 (20:58 +0000) | ||
committer | scislac <scislac@users.sourceforge.net> | |
Mon, 21 Sep 2009 20:58:04 +0000 (20:58 +0000) |
src/desktop.cpp | patch | blob | history | |
src/desktop.h | patch | blob | history |
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 8c070786e6a5d0e6530ad48426cb0abadd55cee7..f7ef1a8cdb79c6d9a02d6a6aef7be6aaf58c5906 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
_layer_hierarchy( 0 ),
_reconstruction_old_layer_id( 0 ),
_display_mode(Inkscape::RENDERMODE_NORMAL),
- _saved_display_mode(Inkscape::RENDERMODE_NORMAL),
_widget( 0 ),
_inkscape( 0 ),
_guides_message_context( 0 ),
SP_CANVAS_ARENA (drawing)->arena->rendermode = mode;
canvas->rendermode = mode;
_display_mode = mode;
- if (mode != Inkscape::RENDERMODE_OUTLINE) {
- _saved_display_mode = _display_mode;
- }
sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (main), _d2w); // redraw
_widget->setTitle(SP_DOCUMENT_NAME(sp_desktop_document(this)));
}
void SPDesktop::displayModeToggle() {
- if (_display_mode == Inkscape::RENDERMODE_OUTLINE) {
- _setDisplayMode(_saved_display_mode);
- } else {
+ switch (_display_mode) {
+ case Inkscape::RENDERMODE_NORMAL:
+ _setDisplayMode(Inkscape::RENDERMODE_NO_FILTERS);
+ break;
+ case Inkscape::RENDERMODE_NO_FILTERS:
_setDisplayMode(Inkscape::RENDERMODE_OUTLINE);
+ break;
+ case Inkscape::RENDERMODE_OUTLINE:
+ default:
+ _setDisplayMode(Inkscape::RENDERMODE_NORMAL);
}
}
diff --git a/src/desktop.h b/src/desktop.h
index 73b9262ddd01d6dfcd93aadc7c8c06d3030e11ab..4438c90e56afc830fc600aca1cfbec2a9b173baf 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
}
void displayModeToggle();
Inkscape::RenderMode _display_mode;
- Inkscape::RenderMode _saved_display_mode;
Inkscape::RenderMode getMode() const { return _display_mode; }
Inkscape::UI::Widget::Dock* getDock() { return _widget->getDock(); }