@@ -161,10 +161,19 @@ public static void fileNew() {
161161 /// Action implementations
162162
163163 // Undo stack
164- undo = new DesignAction (event -> {Main .ui .view .cancelTool (); Main .opStack .undo ();},
165- "Undo" , "Undo the previous operation" , ctrlZ );
166- redo = new DesignAction (event -> {if (!Main .ui .view .hasTool ()) Main .opStack .redo ();},
167- "Redo" , "Repeat an undone operation" , ctrlY );
164+ undo = new DesignAction (event -> {
165+ Main .ui .view .cancelTool ();
166+ Main .opStack .undo ();
167+ //redraw
168+ Main .ui .view .flagStaticRedraw ();
169+ }, "Undo" , "Undo the previous operation" , ctrlZ );
170+ redo = new DesignAction (event -> {
171+ if (!Main .ui .view .hasTool ()) {
172+ Main .opStack .redo ();
173+ }
174+ //redraw
175+ Main .ui .view .flagStaticRedraw ();
176+ }, "Redo" , "Repeat an undone operation" , ctrlY );
168177
169178 // Copy/paste
170179 copy = new DesignAction (event -> Main .clipboard .copy (Main .selection ), "Copy" ,
@@ -181,7 +190,11 @@ public static void fileNew() {
181190 }, "Paste" , "Paste into the design from the application clipboard" , ctrlV );
182191
183192 // Deletion
184- delete = new DesignAction (event -> Main .selection .deleteAll (), "Delete" , "Deletes the selection" , del );
193+ delete = new DesignAction (event -> {
194+ Main .selection .deleteAll ();
195+ //redraw
196+ Main .ui .view .flagStaticRedraw ();
197+ }, "Delete" , "Deletes the selection" , del );
185198
186199 // Rotation
187200 rotateCW = new DesignAction (event -> doRotate (BaseModule .rotationDir .ROT_CW ),
@@ -205,6 +218,8 @@ public static void fileNew() {
205218 }
206219 }
207220 Main .opStack .endCompoundOp ();
221+ //redraw
222+ Main .ui .view .flagStaticRedraw ();
208223 }, "Add/Edit label" , null , ctrlL );
209224
210225 // Label sizing
@@ -219,6 +234,8 @@ public static void fileNew() {
219234 }
220235 }
221236 Main .opStack .endCompoundOp ();
237+ //redraw
238+ Main .ui .view .flagStaticRedraw ();
222239 }, "Big" );
223240 labelSmall = new DesignAction (event -> {
224241 Main .opStack .beginCompoundOp ();
@@ -231,6 +248,8 @@ public static void fileNew() {
231248 }
232249 }
233250 Main .opStack .endCompoundOp ();
251+ //redraw
252+ Main .ui .view .flagStaticRedraw ();
234253 }, "Small (default)" );
235254
236255 // Simulator controls
@@ -251,7 +270,11 @@ public static void fileNew() {
251270 resetView = new DesignAction (event -> Main .ui .resetView (), "Reset View" );
252271
253272 // View controls
254- toggleAA = new DesignAction (event -> Main .ui .view .useAA = !Main .ui .view .useAA ,
273+ toggleAA = new DesignAction (event -> {
274+ Main .ui .view .useAA = !Main .ui .view .useAA ;
275+ //redraw
276+ Main .ui .view .flagStaticRedraw ();
277+ },
255278 "Toggle anti-aliasing" , "Toggles anti-aliased rendering in the viewport: " +
256279 "disabling AA may improve performance on older machines." );
257280
@@ -279,6 +302,8 @@ private static void doRotate(BaseModule.rotationDir dir){
279302 }
280303 }
281304 Main .opStack .endCompoundOp ();
305+ //redraw
306+ Main .ui .view .flagStaticRedraw ();
282307 }
283308
284309 /**
0 commit comments