summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 687553a)
raw | patch | inline | side by side (parent: 687553a)
author | mjwybrow <mjwybrow@users.sourceforge.net> | |
Fri, 12 May 2006 11:00:20 +0000 (11:00 +0000) | ||
committer | mjwybrow <mjwybrow@users.sourceforge.net> | |
Fri, 12 May 2006 11:00:20 +0000 (11:00 +0000) |
When moving/transforming connectors, only detach connectors
from objects that are not part of the selection. Previously,
connectors moved as part of a selection would be detached from
all objects. This has been requested several times via email.
The change also fixes bug #1383806.
from objects that are not part of the selection. Previously,
connectors moved as part of a selection would be detached from
all objects. This has been requested several times via email.
The change also fixes bug #1383806.
ChangeLog | patch | blob | history | |
src/selection-chemistry.cpp | patch | blob | history | |
src/sp-conn-end-pair.cpp | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 0bb5419956ae156d6058862c89be6259994922a5..a0afe6c27b186875a96504beb65ab9940a2b1a3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
2006-05-11 Michael Wybrow <mjwybrow@users.sourceforge.net>
+ * src/selection-chemistry.cpp, src/sp-conn-end-pair.cpp:
+
+ When moving/transforming connectors, only detach connectors
+ from objects that are not part of the selection. Previously,
+ connectors moved as part of a selection would be detached from
+ all objects. This has been requested several times via email.
+ The change also fixes bug #1383806.
+
* src/ui/dialog/inkscape-preferences.cpp,
src/ui/dialog/inkscape-preferences.h, src/connector-context.cpp:
Add a preferences setting to the connector tool for setting
- whether or not connectors attach to text objects. This
+ whether or not connectors attach to text objects. This change
addresses feature request #1434292.
2006-05-09 Carl Hetherington <inkscape@carlh.net>
- * src/nodepath.cpp: fix silly bug with snapping node edits. *
- src/snapper.cpp, src/snapper.h, src/sp-namedview.cpp: re-enable
- link between grid visibility and grid snap.
+ * src/nodepath.cpp: fix silly bug with snapping node edits.
+
+ * src/snapper.cpp, src/snapper.h, src/sp-namedview.cpp:
+ re-enable link between grid visibility and grid snap.
2006-05-08 Michael Wybrow <mjwybrow@users.sourceforge.net>
index 43ff53a7ce7969b923856a7a514ef44e3e10a01b..1225a66f369dcbef3c0d23e87a79407ff4e2bcfd 100644 (file)
#include "sp-flowregion.h"
#include "text-editing.h"
#include "text-context.h"
+#include "connector-context.h"
+#include "sp-path.h"
+#include "sp-conn-end.h"
#include "dropper-context.h"
#include <glibmm/i18n.h>
#include "libnr/nr-matrix-rotate-ops.h"
@@ -1327,7 +1330,21 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, NR::Matrix const
bool transform_textpath_with_path = (SP_IS_TEXT_TEXTPATH(item) && selection->includes( sp_textpath_get_path_item (SP_TEXTPATH(sp_object_first_child(SP_OBJECT(item)))) ));
bool transform_flowtext_with_frame = (SP_IS_FLOWTEXT(item) && selection->includes( SP_FLOWTEXT(item)->get_frame (NULL))); // only the first frame so far
bool transform_offset_with_source = (SP_IS_OFFSET(item) && SP_OFFSET (item)->sourceHref) && selection->includes( sp_offset_get_source (SP_OFFSET(item)) );
-
+
+ // If we're moving a connector, we want to detach it
+ // from shapes that aren't part of the selection, but
+ // leave it attached if they are
+ if (cc_item_is_connector(item)) {
+ SPItem *attItem[2];
+ SP_PATH(item)->connEndPair.getAttachedItems(attItem);
+
+ for (int n = 0; n < 2; ++n) {
+ if (!selection->includes(attItem[n])) {
+ sp_conn_end_detach(item, n);
+ }
+ }
+ }
+
// "clones are unmoved when original is moved" preference
int compensation = prefs_get_int_attribute("options.clonecompensation", "value", SP_CLONE_COMPENSATION_UNMOVED);
bool prefs_unmoved = (compensation == SP_CLONE_COMPENSATION_UNMOVED);
index c4425add69e85c283e794dee4bec0312e7530545..a1c4697e55007eecbd85d90faa8ee94354303e5a 100644 (file)
--- a/src/sp-conn-end-pair.cpp
+++ b/src/sp-conn-end-pair.cpp
static void
avoid_conn_move(NR::Matrix const *mp, SPItem *moved_item)
{
- // Detach from objects if attached.
- sp_conn_end_detach(moved_item, 0);
- sp_conn_end_detach(moved_item, 1);
// Reroute connector
SPPath *path = SP_PATH(moved_item);
path->connEndPair.makePathInvalid();