equal
deleted
inserted
replaced
2780 ! ! |
2780 ! ! |
2781 |
2781 |
2782 !UIPainterView methodsFor:'undo actions'! |
2782 !UIPainterView methodsFor:'undo actions'! |
2783 |
2783 |
2784 createUndoLayout:aView |
2784 createUndoLayout:aView |
2785 "create undo action before changing a views layout |
2785 "create undo action before changing a views layout" |
2786 " |
2786 |
2787 |lyt args prop| |
2787 |lyt args prop| |
2788 |
2788 |
2789 undoHistory isTransactionOpen ifTrue:[ |
2789 undoHistory isTransactionOpen ifTrue:[ |
2790 prop := self propertyOfView:aView. |
2790 prop := self propertyOfView:aView. |
2791 |
2791 |
2838 withArgs:(Array with:(aProp spec) with:(aProp identifier)). |
2838 withArgs:(Array with:(aProp spec) with:(aProp identifier)). |
2839 self undoHistoryChanged. |
2839 self undoHistoryChanged. |
2840 ] |
2840 ] |
2841 ! |
2841 ! |
2842 |
2842 |
|
2843 createUndoStartPointEndPoint:aComponent |
|
2844 "create an undo action before changing aComponent" |
|
2845 |
|
2846 |args prop| |
|
2847 |
|
2848 undoHistory isTransactionOpen ifTrue:[ |
|
2849 prop := self propertyOfView:aComponent. |
|
2850 |
|
2851 prop notNil ifTrue:[ |
|
2852 args := Array new:4. |
|
2853 args at:1 put:(prop identifier). |
|
2854 args at:2 put:#'startPoint:endPoint:'. |
|
2855 args at:3 put:(aComponent startPoint). |
|
2856 args at:4 put:(aComponent endPoint). |
|
2857 undoHistory addUndoSelector:#undoStartPointEndPoint: withArgs:args. |
|
2858 self undoHistoryChanged. |
|
2859 ] |
|
2860 ] |
|
2861 ! |
|
2862 |
2843 undoCreate:something |
2863 undoCreate:something |
2844 "undo method for creating or pasting an object |
2864 "undo method for creating or pasting an object |
2845 " |
2865 " |
2846 self forEach:something do:[:anId|self remove:(self findViewWithId:anId)]. |
2866 self forEach:something do:[:anId|self remove:(self findViewWithId:anId)]. |
2847 ! |
2867 ! |
2900 spec := args at:1. |
2920 spec := args at:1. |
2901 |
2921 |
2902 props spec:spec. |
2922 props spec:spec. |
2903 self rebuildView:view fromSpec:spec withBuilder:nil. |
2923 self rebuildView:view fromSpec:spec withBuilder:nil. |
2904 treeView propertyChanged:props. |
2924 treeView propertyChanged:props. |
|
2925 ] |
|
2926 ! |
|
2927 |
|
2928 undoStartPointEndPoint:args |
|
2929 "undo method to set the old start/endPoint; see 'createUndoStartPointEndPoint:' |
|
2930 " |
|
2931 |view| |
|
2932 |
|
2933 (view := self findViewWithId:(args at:1)) notNil ifTrue:[ |
|
2934 view perform:(args at:2) with:(args at:3) with:(args at:4). |
|
2935 self elementChangedSize:view. |
|
2936 self layoutChanged. |
2905 ] |
2937 ] |
2906 ! ! |
2938 ! ! |
2907 |
2939 |
2908 !UIPainterView::ViewProperty class methodsFor:'instance creation'! |
2940 !UIPainterView::ViewProperty class methodsFor:'instance creation'! |
2909 |
2941 |