Draw.c fixed error in exception I added with string max length.

Window.py added note about the view offset being flipped.
editview.c Fly mode timed redraws so motion is the same speed erespective of scene complexity.
This commit is contained in:
2006-06-23 23:58:50 +00:00
parent 9818b75a28
commit 4d061263a9
3 changed files with 35 additions and 16 deletions

View File

@@ -1476,11 +1476,6 @@ static PyObject *Method_PupBlock( PyObject * self, PyObject * args )
max = (float)PyFloat_AS_DOUBLE(f2);
Py_DECREF( f1 );
Py_DECREF( f2 );
if (max+1>UI_MAX_DRAW_STR) {
Py_DECREF( pyItem );
return EXPP_ReturnPyObjError( PyExc_ValueError, "The maximum length of a string button is 399" );
}
switch ( but->type ) {
case BINT_TYPE:
@@ -1490,6 +1485,10 @@ static PyObject *Method_PupBlock( PyObject * self, PyObject * args )
add_numbut(i, NUM|FLO, text, min, max, &but->val.asfloat, tip);
break;
case BSTRING_TYPE:
if (max+1>UI_MAX_DRAW_STR) {
Py_DECREF( pyItem );
return EXPP_ReturnPyObjError( PyExc_ValueError, "length of a string buttons must be less then 400" );
}
max = (float)floor(max);
if (max > but->slen) {