}
break;
case GDK_Right:
+ case GDK_Up:
frame = timeline_selected + 1;
- if (event->state & GDK_SHIFT_MASK) {
+ if ((event->state & GDK_SHIFT_MASK) || event->keyval == GDK_Up) {
while(frame < timeline_frames && frame_list[frame].marked == 0 && frame_list[frame].keyframe == 0)
frame++;
}
timeline_select_and_save(timeline_selected, frame);
return TRUE;
case GDK_Left:
+ case GDK_Down:
frame = timeline_selected - 1;
- if (event->state & GDK_SHIFT_MASK) {
+ if ((event->state & GDK_SHIFT_MASK) || event->keyval == GDK_Down) {
while(frame >= 0 && frame_list[frame].marked == 0 && frame_list[frame].keyframe == 0)
frame--;
}
int z, d, c, ww, hh, kk;
int rc = -1;
- if (!quick)
- printf("-> apply component to grid and solve");
for (c = 1; c < col->comp; c++) {
int pixles, j;
double *value_ptr, *init_ptr, *mark_ptr;
- if (!quick)
- printf(" #%d(%s)", c, feat_names[c-1]); fflush(stdout);
+ if (!quick) {
+ printf("-> apply component #%d '%s' to grid and solve", c, feat_names[c-1]);
+ fflush(stdout);
+ }
/* apply component
* - copy component into value array (level 0), otherwise 0
* - use maked colors for init array, otherwise use 0
darrayCheckPr(col->values[0], darrayGetPr(col->values[0]) + z*col->w*col->h, col->w*col->h);
memcpy(darrayGetPr(col->image) + z*col->w*col->h*col->comp + c*col->w*col->h, darrayGetPr(col->values[0]) + z*col->w*col->h, col->w*col->h*sizeof(double));
}
+ if (!quick)
+ printf("\n");
}
- if (!quick)
- printf("\n");
#ifdef TEST_SHRINK_XY
for (c = 0; c < col->comp; c++) {
/* end if residual raises again */
#ifdef RESIDUAL
//printf("residual %.8f (change=%%%.4f)\n", curr_residual, (prev_residual-curr_residual)/prev_residual*100);
- if (target_residual_change)
- printf(" %.1f%%", (prev_residual-curr_residual)/prev_residual*100); fflush(stdout);
- if (curr_residual == 0.0) {
- printf(" 0"); fflush(stdout);
- break;
+ if (target_residual_change) {
+ printf(" %.1f%%", (prev_residual-curr_residual)/prev_residual*100);
+ fflush(stdout);
+ if (curr_residual == 0.0) {
+ printf(" 0");
+ fflush(stdout);
+ break;
+ }
+ if ((prev_residual-curr_residual)/prev_residual < target_residual_change)
+ break;
}
- if (target_residual_change && (prev_residual-curr_residual)/prev_residual < target_residual_change)
- break;
prev_residual = curr_residual;
#endif
}