fix for unintended fall-through in switch statement, also reduce undo_pos increments in text editor.

This commit is contained in:
Campbell Barton
2013-07-21 08:34:02 +00:00
parent e9cf211c9b
commit 177ea51fab
2 changed files with 5 additions and 17 deletions

View File

@@ -2016,10 +2016,7 @@ void txt_do_undo(Text *text)
buf[i] = 0;
/* skip over the length that was stored again */
text->undo_pos--;
text->undo_pos--;
text->undo_pos--;
text->undo_pos--;
text->undo_pos -= 4;
/* Get the cursor positions */
txt_undo_read_cursors(text->undo_buf, &text->undo_pos, &curln, &curc, &selln, &selc);
@@ -2053,10 +2050,7 @@ void txt_do_undo(Text *text)
MEM_freeN(buf);
/* skip over the length that was stored again */
text->undo_pos--;
text->undo_pos--;
text->undo_pos--;
text->undo_pos--;
text->undo_pos -= 4;
/* get and restore the cursors */
txt_undo_read_cursors(text->undo_buf, &text->undo_pos, &curln, &curc, &selln, &selc);
@@ -2207,10 +2201,7 @@ void txt_do_redo(Text *text)
text->undo_pos += linep;
/* skip over the length that was stored again */
text->undo_pos++;
text->undo_pos++;
text->undo_pos++;
text->undo_pos++;
text->undo_pos += 4;
txt_delete_sel(text);
@@ -2236,10 +2227,7 @@ void txt_do_redo(Text *text)
MEM_freeN(buf);
/* skip over the length that was stored again */
text->undo_pos++;
text->undo_pos++;
text->undo_pos++;
text->undo_pos++;
text->undo_pos += 4;
break;

View File

@@ -6867,8 +6867,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
(rv3d->persp == RV3D_CAMOB && v3d->camera == ob)) /* special exception for active camera */
{
drawcamera(scene, v3d, rv3d, base, dflag, ob_wire_col);
break;
}
break;
case OB_SPEAKER:
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0)
drawspeaker(scene, v3d, rv3d, ob, dflag);