diff options
| author | Andrius Ramanauskas <knutux@gmail.com> | 2006-03-31 11:50:44 +0000 |
|---|---|---|
| committer | knutux <knutux@users.sourceforge.net> | 2006-03-31 11:50:44 +0000 |
| commit | 70cbab466d2a3e414b3b75584f6ef0f2d8d2fcb5 (patch) | |
| tree | a4a9893ff183ecb63275ed59195e91da54e76ccd /src/selection.h | |
| parent | cleanup: (sp_style_paint_clear): All callers were passing hunref=TRUE, unset=... (diff) | |
| download | inkscape-70cbab466d2a3e414b3b75584f6ef0f2d8d2fcb5.tar.gz inkscape-70cbab466d2a3e414b3b75584f6ef0f2d8d2fcb5.zip | |
patch #1450307 - option for select all to work in layer with it's sub-layers:
* Replaced check-box in preferences with 3 radio buttons (in all document in current layer only, in current layer with sub-layers)
* Altered "Select all" functionality to include objects in sub-layers (if preference is on)
* Altered TAB functionality to include sub-layers (had to introduce "context layer" concept in Selection class - without it TAB'ing would end in deepest child, but it needs to return to parent on subsequent TAB key press)
(bzr r380)
Diffstat (limited to 'src/selection.h')
| -rw-r--r-- | src/selection.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/selection.h b/src/selection.h index 6d403c426..c78a1fdbb 100644 --- a/src/selection.h +++ b/src/selection.h @@ -77,11 +77,18 @@ public: SPDesktop *desktop() { return _desktop; } /** + * @brief Returns active layer for selection (currentLayer or its parent) + * + * @return layer item the selection is bound to + */ + SPObject *activeContext(); + + /** * @brief Add an SPObject to the set of selected objects * * @param obj the SPObject to add */ - void add(SPObject *obj); + void add(SPObject *obj, bool persist_selection_context = false); /** * @brief Add an XML node's SPObject to the set of selected objects @@ -95,7 +102,7 @@ public: * * @param obj the object to select */ - void set(SPObject *obj); + void set(SPObject *obj, bool persist_selection_context = false); /** * @brief Set the selection to an XML node's SPObject @@ -308,11 +315,13 @@ private: static void _schedule_modified(SPObject *obj, guint flags, Selection *selection); /** @brief Releases a selected object that is being removed */ static void _release(SPObject *obj, Selection *selection); + /** @brief Releases an active layer object that is being removed */ + static void _releaseSelectionContext(SPObject *obj, Selection *selection); /** @brief Issues modified selection signal */ void _emitModified(guint flags); /** @brief Issues changed selection signal */ - void _emitChanged(); + void _emitChanged(bool persist_selection_context = false); void _invalidateCachedLists(); @@ -328,12 +337,16 @@ private: void _remove(SPObject *obj); /** @brief returns the SPObject corresponding to an xml node (if any) */ SPObject *_objectForXMLNode(XML::Node *repr) const; + /** @brief Releases an active layer object that is being removed */ + void _releaseContext(SPObject *obj); mutable GSList *_objs; mutable GSList *_reprs; mutable GSList *_items; GC::soft_ptr<SPDesktop> _desktop; + SPObject* _selection_context; + gulong _context_release_handler_id; guint _flags; guint _idle; |
