Mantis - Squeak
Viewing Issue Advanced Details
1454 Morphic tweak always 07-13-05 07:24 02-15-06 19:01
none 3.9  
0001454: [Fix] Add vertex handle doesn't work for arrows.
Go to objects. Get an arrow. Add handles.
The triangle does not add a vertex. Huh?
Polygon class ArrowPrototype goes thru pains to make the arrow inflexible. This confuses the users who expect the add vertex triangle to work as normal.

This changeset comments out the old code and reverts to the more usual behavior.

Ideally someone should do a use test to see which way is best for users. Realistically someone should choose whether this is a bug and fix it or not.

Historical notes: the routines affected were changed in sept-oct 2002 by sw.

This changeset is offered to give the maintainers a choice and to give the users who don't like the current behavior a remedy."!

!PolygonMorph methodsFor: 'editing' stamp: 'wiz 7/13/2005 00:11'!
newVertex: ix event: evt fromHandle: handle
    "Insert a new vertex and fix everything up!! Install the drag-handle of the new vertex as recipient of further mouse events."

    | pt |
    "(self hasProperty: #noNewVertices) ifFalse:
        [pt _ evt cursorPoint.
        self setVertices: (vertices copyReplaceFrom: ix + 1 to: ix with: (Array with: pt)).
        evt hand newMouseFocus: (handles at: ((ix + 1) * 2) - 1)]"
    "modified to remove now vestigial test. see PolygonMorph class>>arrowprototype"
    pt _ evt cursorPoint.
    self setVertices: (vertices copyReplaceFrom: ix + 1 to: ix with: (Array with: pt)).
    evt hand newMouseFocus: (handles at: ((ix + 1) * 2) - 1)! !
duplicate of 0001448closed  Can't add point to line with arrow 
 arrowPrototypeFix-wiz.1.cs.gz [^] (793 bytes) 07-13-05 07:24
 arrowPrototypeFix-wiz.2.cs.gz [^] (1,063 bytes) 07-13-05 07:44

07-13-05 07:47   
First cs missed the change to PM class>>arrowPrototype.

While either change fixes the behavior, keeping the code clean requires both fixes.

!PolygonMorph class methodsFor: 'instance creation' stamp: 'wiz 7/13/2005 00:43'!
    "Answer an instance of the receiver that will serve as a prototypical arrow"

    | aa |
    aa _ self new.
    aa vertices: (Array with: 0@0 with: 40@40)
        color: Color black
        borderWidth: 2
        borderColor: Color black.
    "aa setProperty: #noNewVertices toValue: true."
    "Revert to expected behavior. Remove vestigial code."
    aa makeForwardArrow. "is already open"
    aa computeBounds.
02-15-06 19:01   
in 3.9

Name: MorphicExtras-jmv.9
Author: jmv
Time: 12 January 2006, 1:33:41 pm
UUID: 2720167c-765e-9541-8f14-dd3789d8fca8
Ancestors: MorphicExtras-CdG.7

This version includes stuff from one or more of:
Mantis-1092-MorphDropFix, fix by Edgar De Cleene (edc) and Scott Wallace (sw)
Mantis-0503-TargetSighting, fix by Jerome Peace (wiz)
Mantis-1015-SnapView, fix by Jerome Peace (wiz)
Mantis-1771-ClickExerciser, fix by Jerome Peace (wiz)
Mantis-1625-Thumbnails, fix by Jerome Peace (wiz)
Mantis-1484-TrashHalo, fix by Jerome Peace (wiz)
Mantis-1454-ArrowPrototypeFix, fix by Jerome Peace (wiz)
Mantis-1347-ListDoubleClick, fix by Jerome Peace (wiz)
Reviewed by Juan Vuletich (jmv)