diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-03 09:40:20 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-03 09:40:20 +0000 |
| commit | ea7e97bada72126b47c60cd846c168f111bae4a7 (patch) | |
| tree | 0c56c305b1fed699334464efb21c0630c1e8c7c8 /src/live_effects/parameter | |
| parent | New LPE: Offset (diff) | |
| download | inkscape-ea7e97bada72126b47c60cd846c168f111bae4a7.tar.gz inkscape-ea7e97bada72126b47c60cd846c168f111bae4a7.zip | |
First shot at a dropdown selector for various shapes in pen/pencil tool, along the lines of Valerie's blueprint.
TODO: more paths for the dropdown, read them from a separate file; show images for the choices, not text
(bzr r6127)
Diffstat (limited to 'src/live_effects/parameter')
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 15 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.h | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 295e40b7a..16e579d16 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -346,24 +346,29 @@ PathParam::on_edit_button_click() } void -PathParam::on_paste_button_click() +PathParam::paste_param_path(const char *svgd) { - Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get(); - Glib::ustring svgd = cm->getPathParameter(); - if (svgd == "") return; // remove possible link to path remove_link(); - param_write_to_repr(svgd.data()); + param_write_to_repr(svgd); signal_path_pasted.emit(); sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Paste path parameter")); } void +PathParam::on_paste_button_click() +{ + Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get(); + Glib::ustring svgd = cm->getPathParameter(); + paste_param_path(svgd.data()); +} + +void PathParam::on_copy_button_click() { Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get(); diff --git a/src/live_effects/parameter/path.h b/src/live_effects/parameter/path.h index 64c2de55c..8dcda8215 100644 --- a/src/live_effects/parameter/path.h +++ b/src/live_effects/parameter/path.h @@ -55,6 +55,9 @@ public: sigc::signal <void> signal_path_pasted; sigc::signal <void> signal_path_changed; + void paste_param_path(const char *svgd); + void on_paste_button_click(); + protected: std::vector<Geom::Path> _pathvector; // this is primary data storage, since it is closest to SVG. @@ -75,7 +78,6 @@ protected: void linked_modified(SPObject *linked_obj, guint flags); void on_edit_button_click(); - void on_paste_button_click(); void on_copy_button_click(); void on_link_button_click(); |
