summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a38443)
raw | patch | inline | side by side (parent: 7a38443)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 22 Oct 2007 18:12:35 +0000 (18:12 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 22 Oct 2007 18:12:35 +0000 (18:12 +0000) |
src/selection-chemistry.cpp | patch | blob | history |
index 2466b542eb8c697d0d3da9bf872414e38eda48ad..8d0aa4e79eb1c0aed1ee6218bcab239979f850f2 100644 (file)
#include "unit-constants.h"
#include "xml/simple-document.h"
#include "sp-filter-reference.h"
+#include "gradient-drag.h"
using NR::X;
using NR::Y;
@@ -973,6 +974,20 @@ void sp_copy_stuff_used_by_item (GSList **defs_clip, SPItem *item, const GSList
}
}
+void
+sp_set_style_clipboard (SPCSSAttr *css)
+{
+ if (css != NULL) {
+ // clear style clipboard
+ if (style_clipboard) {
+ sp_repr_css_attr_unref (style_clipboard);
+ style_clipboard = NULL;
+ }
+ //sp_repr_css_print (css);
+ style_clipboard = css;
+ }
+}
+
/**
* \pre item != NULL
*/
return; // copied color under cursor, nothing else to do
}
+ if (desktop->event_context->get_drag() && desktop->event_context->get_drag()->copy()) {
+ return; // copied selected stop(s), nothing else to do
+ }
+
// check if something is selected
if (selection->isEmpty()) {
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing was copied."));
SPStyle *const query = sp_style_new(SP_ACTIVE_DOCUMENT);
if (sp_desktop_query_style_all (desktop, query)) {
SPCSSAttr *css = sp_css_attr_from_style (query, SP_STYLE_FLAG_ALWAYS);
- if (css != NULL) {
- // clear style clipboard
- if (style_clipboard) {
- sp_repr_css_attr_unref (style_clipboard);
- style_clipboard = NULL;
- }
- //sp_repr_css_print (css);
- style_clipboard = css;
- }
+ sp_set_style_clipboard (css);
}
sp_style_unref(query);
}
Inkscape::Selection *selection = sp_desktop_selection(desktop);
// check if something is in the clipboard
- if (clipboard == NULL) {
- desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing on the clipboard."));
+ if (style_clipboard == NULL) {
+ desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing on the style clipboard."));
return;
}