src/ldtypes.cpp

changeset 553
2418d5955421
parent 551
0efe5dbcef07
child 554
2478a6b3106d
equal deleted inserted replaced
552:454f8b730946 553:2418d5955421
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #include "main.h" 19 #include "main.h"
20 #include "ldtypes.h" 20 #include "ldtypes.h"
21 #include "file.h" 21 #include "document.h"
22 #include "misc.h" 22 #include "misc.h"
23 #include "gui.h" 23 #include "gui.h"
24 #include "history.h" 24 #include "history.h"
25 #include "gldraw.h" 25 #include "gldraw.h"
26 #include "colors.h" 26 #include "colors.h"
354 // If we move down, we need to iterate the array in reverse order. 354 // If we move down, we need to iterate the array in reverse order.
355 const long start = up ? 0 : (objs.size() - 1); 355 const long start = up ? 0 : (objs.size() - 1);
356 const long end = up ? objs.size() : -1; 356 const long end = up ? objs.size() : -1;
357 const long incr = up ? 1 : -1; 357 const long incr = up ? 1 : -1;
358 QList<LDObject*> objsToCompile; 358 QList<LDObject*> objsToCompile;
359 LDFile* file = objs[0]->getFile(); 359 LDDocument* file = objs[0]->getFile();
360 360
361 for (long i = start; i != end; i += incr) 361 for (long i = start; i != end; i += incr)
362 { LDObject* obj = objs[i]; 362 { LDObject* obj = objs[i];
363 363
364 const long idx = obj->getIndex(), 364 const long idx = obj->getIndex(),

mercurial