src/file.cpp

changeset 317
e41ab239ed28
parent 316
b4fefda58f43
child 318
de051d2bd80b
--- a/src/file.cpp	Tue Jul 02 21:39:47 2013 +0300
+++ b/src/file.cpp	Tue Jul 02 22:53:20 2013 +0300
@@ -532,6 +532,7 @@
 	g_win->updateTitle();
 	g_win->R()->setFile( file );
 	g_win->R()->resetAngles();
+	g_win->R()->overlaysFromObjects();
 	
 	// Add it to the recent files list.
 	addRecentFile( path );
@@ -674,16 +675,16 @@
 				}
 				elif( tokens[2] == "OVERLAY" )
 				{
-					CHECK_TOKEN_COUNT( 8 );
-					CHECK_TOKEN_NUMBERS( 4, 7 )
+					CHECK_TOKEN_COUNT( 9 );
+					CHECK_TOKEN_NUMBERS( 5, 8 )
 					
 					LDOverlay* obj = new LDOverlay;
-					obj->setFilename( tokens[2] );
-					obj->setCamera( tokens[3].toLong() );
-					obj->setX( tokens[4].toLong() );
-					obj->setY( tokens[5].toLong() );
-					obj->setWidth( tokens[6].toLong() );
-					obj->setHeight( tokens[7].toLong() );
+					obj->setFilename( tokens[3] );
+					obj->setCamera( tokens[4].toLong() );
+					obj->setX( tokens[5].toLong() );
+					obj->setY( tokens[6].toLong() );
+					obj->setWidth( tokens[7].toLong() );
+					obj->setHeight( tokens[8].toLong() );
 					return obj;
 				}
 			}

mercurial