@@ -161,10 +161,19 @@ public static void fileNew() {
161
161
/// Action implementations
162
162
163
163
// 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 );
168
177
169
178
// Copy/paste
170
179
copy = new DesignAction (event -> Main .clipboard .copy (Main .selection ), "Copy" ,
@@ -181,7 +190,11 @@ public static void fileNew() {
181
190
}, "Paste" , "Paste into the design from the application clipboard" , ctrlV );
182
191
183
192
// 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 );
185
198
186
199
// Rotation
187
200
rotateCW = new DesignAction (event -> doRotate (BaseModule .rotationDir .ROT_CW ),
@@ -205,6 +218,8 @@ public static void fileNew() {
205
218
}
206
219
}
207
220
Main .opStack .endCompoundOp ();
221
+ //redraw
222
+ Main .ui .view .flagStaticRedraw ();
208
223
}, "Add/Edit label" , null , ctrlL );
209
224
210
225
// Label sizing
@@ -219,6 +234,8 @@ public static void fileNew() {
219
234
}
220
235
}
221
236
Main .opStack .endCompoundOp ();
237
+ //redraw
238
+ Main .ui .view .flagStaticRedraw ();
222
239
}, "Big" );
223
240
labelSmall = new DesignAction (event -> {
224
241
Main .opStack .beginCompoundOp ();
@@ -231,6 +248,8 @@ public static void fileNew() {
231
248
}
232
249
}
233
250
Main .opStack .endCompoundOp ();
251
+ //redraw
252
+ Main .ui .view .flagStaticRedraw ();
234
253
}, "Small (default)" );
235
254
236
255
// Simulator controls
@@ -251,7 +270,11 @@ public static void fileNew() {
251
270
resetView = new DesignAction (event -> Main .ui .resetView (), "Reset View" );
252
271
253
272
// 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
+ },
255
278
"Toggle anti-aliasing" , "Toggles anti-aliased rendering in the viewport: " +
256
279
"disabling AA may improve performance on older machines." );
257
280
@@ -279,6 +302,8 @@ private static void doRotate(BaseModule.rotationDir dir){
279
302
}
280
303
}
281
304
Main .opStack .endCompoundOp ();
305
+ //redraw
306
+ Main .ui .view .flagStaticRedraw ();
282
307
}
283
308
284
309
/**
0 commit comments