diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2008-06-13 15:55:51 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2008-06-13 15:55:51 +0000 |
| commit | e5ec4c23a1e63eca1c9375f8b0ac9f598ee58417 (patch) | |
| tree | a82c7ce7f272e9e4dc38ce4eaeeffd463fda0954 /src/dialogs/layers-panel.cpp | |
| parent | Resolve ID clashes when importing files (fixes bug 168626). (diff) | |
| download | inkscape-e5ec4c23a1e63eca1c9375f8b0ac9f598ee58417.tar.gz inkscape-e5ec4c23a1e63eca1c9375f8b0ac9f598ee58417.zip | |
Added the ability to toggle a layer "solo". Fixes bug #171530.
(bzr r5922)
Diffstat (limited to 'src/dialogs/layers-panel.cpp')
| -rw-r--r-- | src/dialogs/layers-panel.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp index 480b60b63..ebb6d989d 100644 --- a/src/dialogs/layers-panel.cpp +++ b/src/dialogs/layers-panel.cpp @@ -63,7 +63,8 @@ enum { BUTTON_UP, BUTTON_DOWN, // BUTTON_DUPLICATE, - BUTTON_DELETE + BUTTON_DELETE, + BUTTON_SOLO }; class ImageToggler : public Gtk::CellRendererPixbuf { @@ -353,6 +354,10 @@ bool LayersPanel::_executeAction() { _fireAction( SP_VERB_LAYER_DELETE ); } + case BUTTON_SOLO: + { + _fireAction( SP_VERB_LAYER_SOLO ); + } break; } @@ -575,7 +580,7 @@ void LayersPanel::_toggled( Glib::ustring const& str, int targetCol ) row[_model->_colVisible] = newValue; item->setHidden( !newValue ); item->updateRepr(); - sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, + sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, newValue? _("Unhide layer") : _("Hide layer")); } break; @@ -586,7 +591,7 @@ void LayersPanel::_toggled( Glib::ustring const& str, int targetCol ) row[_model->_colLocked] = newValue; item->setLocked( newValue ); item->updateRepr(); - sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, + sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, newValue? _("Lock layer") : _("Unlock layer")); } break; @@ -777,6 +782,7 @@ LayersPanel::LayersPanel() : { _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_RENAME, 0, "Rename", (int)BUTTON_RENAME ) ); _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_NEW, 0, "New", (int)BUTTON_NEW ) ); + _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_SOLO, 0, "Solo", (int)BUTTON_SOLO ) ); _popupMenu.items().push_back( Gtk::Menu_Helpers::SeparatorElem() ); |
