| 772 | } |
| 773 | |
| 774 | void App::loadLayoutFile( std::string layoutPath ) { |
| 775 | if ( FileSystem::fileExists( layoutPath ) ) { |
| 776 | loadLayout( layoutPath ); |
| 777 | |
| 778 | for ( auto pathIt = mRecentFiles.begin(); pathIt != mRecentFiles.end(); pathIt++ ) { |
| 779 | if ( *pathIt == layoutPath ) { |
| 780 | mRecentFiles.erase( pathIt ); |
| 781 | break; |
| 782 | } |
| 783 | } |
| 784 | |
| 785 | mRecentFiles.insert( mRecentFiles.begin(), layoutPath ); |
| 786 | |
| 787 | if ( mRecentFiles.size() > 10 ) |
| 788 | mRecentFiles.resize( 10 ); |
| 789 | |
| 790 | updateRecentFiles(); |
| 791 | } |
| 792 | } |
| 793 | |
| 794 | void App::loadProject( std::string projectPath ) { |
| 795 | if ( !FileSystem::fileExists( projectPath ) ) |