Roy_043 wrote: ↑Thu Apr 20, 2023 4:32 pm
sliptonic wrote: ↑Thu Apr 20, 2023 4:08 pm
standard behavior of the ESC key? Cancel or exit and apply?
Please study the 4 mentioned Draft command and also the
Sketcher_CreatePolyline command. We may need to define a 3rd or even a 4th behavior.
I don't understand your point. Is there a nuance of behavior I'm missing?
Draft
The four draft tools let you start drawing by clicking points and they update the window in realtime with the result.
Pressing the esc key is fairly consistent:
Draft_Wire: Exits the active tool and leaves new wire in place
Draft_BSpline: Exits the active tool and leaves new bspline in place
Draft_CubicBezCurve: Exits the active tool and leaves new bezcurve in place
Draft_BezCurve: Exits the active tool and leaves new bezcurve in place
With all four, you can double click the resulting object and open a task to edit the object. There's no panel immediately visible but one magically appears if you start dragging a point. Pressing escape exits the task and leaves any changes made intact.
Draft_Point: Esc isn't relevant during creation. But if you double-click the created point it opens the transform tool (not like the others). Pressing escape, exits the transform tool but leaves a task open. Pressing escape again does nothing and you have to click 'ok' to close the task. For me, double-clicking the point again causes a crash.
ShapeString doesn't update the window either during creation or edit. Even if you've configured the font, and height, set the point. Pressing the escape key is the same as pressing cancel. The transaction is aborted and any work done is lost. If you press 'ok' instead of escape, the shapestring is created. Double clicking it reopens the same dialog as creation. Pressing escape aborts the changes.
Draft behavior for editing objects and for the escape key isn't consistent with other workbenches. It isn't even consistent between tools in Draft.
I can't say that Draft behavior for any one tool is wrong because we don't have any agreed guidelines on what it
should be.
Sketcher
Polyline: Exits the active tool and leaves the new polyline in place
Sketch: Exits the sketch and leaves it intact
Sketcher creation, edit, and escape is consistent throughout sketcher
Part Design
Tools like Pad show the result in real time. Pressing Esc cancels the transactions and leaves the document unchanged.
I don't mind if there are multiple behaviors that depend on context. I just want to know what the rules are that govern these design choices.