Hi,
I made the code more useable and fixed some selection issues. Also, points can now be in groups. A point is added to a group by selecting the group (and nothing else) and shift-clicking to create the point. I am working on a UI to add one or more existing points to a group. Undo/redo does not yet work properly together with the connector context, I had one crash and the point handles do not yet get updated when undoing/redoing. I am working on this.
The current code can be found at [0].
Sebastian
[0] https://code.launchpad.net/~h-e-6/inkscape/connector-wip
On Sun, 2013-09-08 at 22:47 +0200, Sebastian Götte wrote:
Hi,
I made the code more useable and fixed some selection issues. Also, points can now be in groups. A point is added to a group by selecting the group (and nothing else) and shift-clicking to create the point. I am working on a UI to add one or more existing points to a group. Undo/redo does not yet work properly together with the connector context, I had one crash and the point handles do not yet get updated when undoing/redoing. I am working on this.
Looks good! It is fun to move groups around and have the connectors update.
We are getting close to the end of GSOC so we need to decide what needs to be done in the time remaining. The things I think are most important are:
1. The code should at least be able to do everything the previous code did (except direct connecting to objects).
2. The UI needs to be documented.
3. Bugs squashed.
I think (1) is almost there. For (2), I realize the UI is a work-in-progress but it needs to be documented so people can test it. Also the Status Bar messages need to be update.
Here are some specific problems:
1. With connector-tool, changing selection doesn't change which points are highlighted. If I select an object, the object (group's) points should be highlighted; if I select a connector, the connector's endpoints should be highlighted.
2. Cursor image isn't updated correctly
On 09/09/2013 11:28 AM, Tavmjong Bah wrote:
On Sun, 2013-09-08 at 22:47 +0200, Sebastian Götte wrote:
Hi,
I made the code more useable and fixed some selection issues. Also, points can now be in groups. A point is added to a group by selecting the group (and nothing else) and shift-clicking to create the point. I am working on a UI to add one or more existing points to a group. Undo/redo does not yet work properly together with the connector context, I had one crash and the point handles do not yet get updated when undoing/redoing. I am working on this.
Looks good! It is fun to move groups around and have the connectors update.
You should try rotating groups containing points...
I am slightly concerned about the performance of this "live updating" approach, especially in more complex scenarios including libavoid routing. The old code just updated the connectors after all changes have been made, but the live update looks so nice... Fortunately, I am the proud owner of a very slow laptop, so I can test this rather well.
We are getting close to the end of GSOC so we need to decide what needs to be done in the time remaining. The things I think are most important are:
- The code should at least be able to do everything the previous code
did (except direct connecting to objects).
With respect to this, next on are libavoid attributes and refs on random objects.
The UI needs to be documented.
Bugs squashed.
I think (1) is almost there. For (2), I realize the UI is a work-in-progress but it needs to be documented so people can test it. Also the Status Bar messages need to be update.
I started adding some status bar messages. If I am not entirely mistaken, the proper place for UI documentation should be the "inkscape-docs" repository on launchpad [0].
Here are some specific problems:
- With connector-tool, changing selection doesn't change which points
are highlighted. If I select an object, the object (group's) points should be highlighted; if I select a connector, the connector's endpoints should be highlighted.
Ok, I now coupled object and point selection. Points/items can still be selected individually, but when the selection of an item is changed, the selection of all contained points is changed as well. When the selection of a connector is changed, the selection of the connector's endpoints is changed. The only quirk of this approac is that when two connectors share an endpoint and one is selected and [Delete] is pressed, the other connector is deleted as well since at the point [Delete] is pressed the selection contains both the one connector and both of its endpoints, including the shared one and when the shared endpoint is deleted, the other connector is deleted. I think that's not too much of a problem, though.
- Cursor image isn't updated correctly
Fixed. I forgot to chain the ConnectorContext's setup function with the EventContext's, where the cursor is set.
On 09/09/2013 11:41 AM, Tavmjong Bah wrote:> On Sun, 2013-09-08 at 22:47 +0200, Sebastian Götte wrote:
Hi,
I made the code more useable and fixed some selection issues. Also, points can now be in groups. A point is added to a group by selecting the group (and nothing else) and shift-clicking to create the point. I am working on a UI to add one or more existing points to a group. Undo/redo does not yet work properly together with the connector context, I had one crash and the point handles do not yet get updated when undoing/redoing. I am working on this.
Hit the Send button too quick...
Here are two files:
- Patch file for Connector Toolbar icons (modifies icons.svg,
connectors-toolbar.cpp).
Thanks, I just merged it and fixed the toolbar code.
- Test file for a connector connecting grouped points.
I just tried to open this file and play around with it a bit, to me it seems to work now.
I still have one spurious segfault left that sometimes occurs when deleting an SPPoint. The next time I trigger it I will look into this one. The current code can be found on launchpad [1].
Sebastian
[0] https://launchpad.net/inkscape-docs [1] https://code.launchpad.net/~h-e-6/inkscape/connector-wip
On Mon, 2013-09-09 at 18:31 +0200, Sebastian Götte wrote:
I am slightly concerned about the performance of this "live updating" approach, especially in more complex scenarios including libavoid routing. The old code just updated the connectors after all changes have been made, but the live update looks so nice... Fortunately, I am the proud owner of a very slow laptop, so I can test this rather well.
I would leave performance issues to a later date.
I started adding some status bar messages. If I am not entirely mistaken, the proper place for UI documentation should be the "inkscape-docs" repository on launchpad [0].
Probably in the long term. For the moment, I would just create a Wiki page somewhere. When the code gets merged into trunk, then the release notes should be updated:
http://wiki.inkscape.org/wiki/index.php/Release_notes/0.49
Ok, I now coupled object and point selection. Points/items can still be selected individually, but when the selection of an item is changed, the selection of all contained points is changed as well. When the selection of a connector is changed, the selection of the connector's endpoints is changed. The only quirk of this approac is that when two connectors share an endpoint and one is selected and [Delete] is pressed, the other connector is deleted as well since at the point [Delete] is pressed the selection contains both the one connector and both of its endpoints, including the shared one and when the shared endpoint is deleted, the other connector is deleted. I think that's not too much of a problem, though.
When a connector is deleted, I would not delete the points. That should be a separate operation (explicitly select the points and then delete them).
I still have one spurious segfault left that sometimes occurs when deleting an SPPoint. The next time I trigger it I will look into this one. The current code can be found on launchpad [1].
Great improvements!
Tav
On 09/10/2013 11:33 AM, Tavmjong Bah wrote:
Ok, I now coupled object and point selection. Points/items can still be selected individually, but when the selection of an item is changed, the selection of all contained points is changed as well. When the selection of a connector is changed, the selection of the connector's endpoints is changed. The only quirk of this approac is that when two connectors share an endpoint and one is selected and [Delete] is pressed, the other connector is deleted as well since at the point [Delete] is pressed the selection contains both the one connector and both of its endpoints, including the shared one and when the shared endpoint is deleted, the other connector is deleted. I think that's not too much of a problem, though.
When a connector is deleted, I would not delete the points. That should be a separate operation (explicitly select the points and then delete them).
For this either I would have to go back to the old selection mechanics (which I think are not nice) or I would have to "filter" the selection when deleting: When a mix of regular shapes/connectors and points is selected, just delete the shapes and connectors and leave the points alone. Only delete points when nothing but points is selected.
This sounds like a kind of hack-y solution to me, but I can't think of a better one yet.
Sebastian
Hey Sebastian,
Great work so far! I just want to throw out there, Shift+Click to add connector points seems like a non-obvious and bad way to add points. It really seems like a click (vs click-drag) should just create a point (unless you're hovering over an existing point, then it should just be selected or activated to have a connector start there).
Additionally, I don't think it's terribly useful that a person can create a connector without the context of connection points (I could be wrong about this). BTW, the click vs shift-click issue is based on the usability a couple other tools, shift+click is to select more than one of something rather than create something (again, I could be wrong but I think the selector, node, and gradient tools are good reasons to remain consistent).
Cheers, Josh
On Tue, Sep 10, 2013 at 6:51 AM, Sebastian Götte <jaseg@...2974...> wrote:
On 09/10/2013 11:33 AM, Tavmjong Bah wrote:
Ok, I now coupled object and point selection. Points/items can still be selected individually, but when the selection of an item is changed, the selection of all contained points is changed as well. When the selection of a connector is changed, the selection of the connector's endpoints is changed. The only quirk of this approac is that when two connectors share an endpoint and one is selected and [Delete] is pressed, the other connector is deleted as well since at the point [Delete] is pressed the selection contains both the one connector and both of its endpoints, including the shared one and when the shared endpoint is deleted, the other connector is deleted. I think that's not too much of a problem, though.
When a connector is deleted, I would not delete the points. That should be a separate operation (explicitly select the points and then delete them).
For this either I would have to go back to the old selection mechanics (which I think are not nice) or I would have to "filter" the selection when deleting: When a mix of regular shapes/connectors and points is selected, just delete the shapes and connectors and leave the points alone. Only delete points when nothing but points is selected.
This sounds like a kind of hack-y solution to me, but I can't think of a better one yet.
Sebastian
How ServiceNow helps IT people transform IT departments:
- Consolidate legacy IT systems to a single system of record for IT
- Standardize and globalize service processes across IT
- Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clk... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On 09/10/2013 04:14 PM, Josh Andler wrote:
Hey Sebastian,
Great work so far! I just want to throw out there, Shift+Click to add connector points seems like a non-obvious and bad way to add points. It really seems like a click (vs click-drag) should just create a point (unless you're hovering over an existing point, then it should just be selected or activated to have a connector start there).
I see the problem. I do not really like this solution myself, but I think using plain clicks would be even worse. During testing I found the single-click point creation extremely annoying when modifying a selection. The other tools that allow single-click object creation (curve, pencil etc.) unlike the connector tool do not allow object selection. I rather break with the single-click object creation pattern that is used everywhere else than with the single-click object selection pattern.
Additionally, I don't think it's terribly useful that a person can create a connector without the context of connection points (I could be wrong about this).
What do you mean by this?
BTW, the click vs shift-click issue is based on the usability a couple other tools, shift+click is to select more than one of something rather than create something (again, I could be wrong but I think the selector, node, and gradient tools are good reasons to remain consistent).
Cheers, Josh
Thanks, Sebastian
First off... VERY sorry for the delayed reply!
On Sep 12, 2013 4:35 AM, "Sebastian Götte" <jaseg@...2974...> wrote:
I see the problem. I do not really like this solution myself, but I think
using plain clicks would be even worse. During testing I found the single-click point creation extremely annoying when modifying a selection. The other tools that allow single-click object creation (curve, pencil etc.) unlike the connector tool do not allow object selection. I rather break with the single-click object creation pattern that is used everywhere else than with the single-click object selection pattern.
This makes a little more sense to me now. I apparently missed the fact that you could select objects with the tool itself. It still seems "off" though... what about the possibility of double-click to create a CP (Connector Point) or maybe Ctrl+Alt+Click can both either create or delete a CP (the Ctrl+Alt+Click would then be consistent with the node tool and gradient tool for creating/removing their respective "points"). Shift+Click would be more consistent in an add-to-selection context... which maybe one day could be useful (the following sentence is NOT in the scope of your SoC project). Select whatever CPs you want and a button on the Controls Bar would connect all CPs in the selection.
Additionally, I don't think it's terribly useful that a person can create a connector without the context of connection points (I could be wrong about this).
What do you mean by this?
I was mistaken with my initial observation. I guess my issue is being able to click an existing CP and be able to drag out a connector which then creates another CP on release that doesn't appear to be anchored to the desired target (sometimes rather close to another existing CP it will still create another).
However, relating to the selection and creation abilities above. The problem I see currently (which I just verified with r12417 of the branch) is that I can single click an object and Shift+Click to create a CP, select a different object and create a CP for that one, then I can connect the two points... but when I move the parent objects the CPs aren't "attached" to them.
Cheers,
Josh
On 09/19/2013 05:59 PM, Josh Andler wrote:
First off... VERY sorry for the delayed reply!
On Sep 12, 2013 4:35 AM, "Sebastian Götte" <jaseg@...2974...> wrote:
I see the problem. I do not really like this solution myself, but I think
using plain clicks would be even worse. During testing I found the single-click point creation extremely annoying when modifying a selection. The other tools that allow single-click object creation (curve, pencil etc.) unlike the connector tool do not allow object selection. I rather break with the single-click object creation pattern that is used everywhere else than with the single-click object selection pattern.
This makes a little more sense to me now. I apparently missed the fact that you could select objects with the tool itself. It still seems "off" though... what about the possibility of double-click to create a CP (Connector Point) or maybe Ctrl+Alt+Click can both either create or delete a CP (the Ctrl+Alt+Click would then be consistent with the node tool and gradient tool for creating/removing their respective "points"). Shift+Click would be more consistent in an add-to-selection context... which maybe one day could be useful (the following sentence is NOT in the scope of your SoC project). Select whatever CPs you want and a button on the Controls Bar would connect all CPs in the selection.
I just pushed a commit that changes the shortcut to Ctrl+Alt+Click for SPPoint creation/deletion.
Additionally, I don't think it's terribly useful that a person can create a connector without the context of connection points (I could be wrong about this).
What do you mean by this?
I was mistaken with my initial observation. I guess my issue is being able to click an existing CP and be able to drag out a connector which then creates another CP on release that doesn't appear to be anchored to the desired target (sometimes rather close to another existing CP it will still create another).
This is a snapping issue. I will look into this.
However, relating to the selection and creation abilities above. The problem I see currently (which I just verified with r12417 of the branch) is that I can single click an object and Shift+Click to create a CP, select a different object and create a CP for that one, then I can connect the two points... but when I move the parent objects the CPs aren't "attached" to them.
This is because the code did only add SPPoints to existing groups, not arbitrary objects since otherwise the points would not move with the objects properly. The commit I just pushed contains a fix for this. Now, when a single regular object (instead of a group) is selected and a SPPoint is created, the object is automatically added to a new group.
Sebastian
On Sun, 2013-09-08 at 22:47 +0200, Sebastian Götte wrote:
Hi,
I made the code more useable and fixed some selection issues. Also, points can now be in groups. A point is added to a group by selecting the group (and nothing else) and shift-clicking to create the point. I am working on a UI to add one or more existing points to a group. Undo/redo does not yet work properly together with the connector context, I had one crash and the point handles do not yet get updated when undoing/redoing. I am working on this.
Hit the Send button too quick...
Here are two files:
1. Patch file for Connector Toolbar icons (modifies icons.svg, connectors-toolbar.cpp). 2. Test file for a connector connecting grouped points.
Tav
participants (3)
-
Josh Andler
-
Sebastian Götte
-
Tavmjong Bah