| 297 | } |
| 298 | |
| 299 | std::pair<UITab*, UICodeEditor*> App::loadLayout( std::string file, bool updateCurrentLayout ) { |
| 300 | mUIContainer->getContainer()->closeAllChildren(); |
| 301 | mUISceneNode->update( Time::Zero ); |
| 302 | |
| 303 | Uint32 marker = String::hash( updateCurrentLayout ? file : mCurrentLayout ); |
| 304 | |
| 305 | mUISceneNode->getStyleSheet().removeAllWithMarker( marker ); |
| 306 | mUISceneNode->loadLayoutFromFile( file, mUIContainer, marker ); |
| 307 | |
| 308 | if ( updateCurrentLayout ) { |
| 309 | tryUpdateWatch( file ); |
| 310 | |
| 311 | mCurrentLayout = file; |
| 312 | |
| 313 | if ( !mSplitter->isDocumentOpen( file ) ) { |
| 314 | SceneManager::instance()->setCurrentUISceneNode( mAppUISceneNode ); |
| 315 | auto d = mSplitter->loadFileFromPathInNewTab( file ); |
| 316 | SceneManager::instance()->setCurrentUISceneNode( mUISceneNode ); |
| 317 | return d; |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | return std::make_pair( nullptr, nullptr ); |
| 322 | } |
| 323 | |
| 324 | void App::saveTmpDocument( TextDocument& doc, |
| 325 | std::function<void( const std::string& tmpPath )> action ) { |
nothing calls this directly
no test coverage detected