@@ -2925,7 +2925,7 @@ App::getForcePositionFn( TextPosition initialPosition ) {
2925
2925
return forcePosition;
2926
2926
}
2927
2927
2928
- void App::initProjectTreeView ( std::string path, bool openClean ) {
2928
+ void App::initProjectTreeViewUI ( ) {
2929
2929
mProjectViewEmptyCont = mUISceneNode ->find <UILinearLayout>( " project_view_empty" );
2930
2930
mProjectViewEmptyCont ->find <UIPushButton>( " open_folder" )
2931
2931
->on ( Event::MouseClick, [this ]( const Event* event ) {
@@ -2999,6 +2999,12 @@ void App::initProjectTreeView( std::string path, bool openClean ) {
2999
2999
}
3000
3000
}
3001
3001
} );
3002
+ mProjectTreeView ->setDisableCellClipping ( true );
3003
+ mProjectTreeView ->setAutoExpandOnSingleColumn ( true );
3004
+ }
3005
+
3006
+ void App::initProjectTreeView ( std::string path, bool openClean ) {
3007
+ initProjectTreeViewUI ();
3002
3008
3003
3009
bool hasPosition = pathHasPosition ( path );
3004
3010
TextPosition initialPosition;
@@ -3069,9 +3075,6 @@ void App::initProjectTreeView( std::string path, bool openClean ) {
3069
3075
mStatusBar ->setVisible ( false );
3070
3076
}
3071
3077
}
3072
-
3073
- mProjectTreeView ->setDisableCellClipping ( true );
3074
- mProjectTreeView ->setAutoExpandOnSingleColumn ( true );
3075
3078
}
3076
3079
3077
3080
void App::initImageView () {
@@ -3199,6 +3202,12 @@ void App::loadFolder( std::string path ) {
3199
3202
mStatusBar ->setVisible ( mConfig .ui .showStatusBar );
3200
3203
}
3201
3204
3205
+ if ( !mProjectTreeView ) {
3206
+ showSidePanel ( mConfig .ui .showSidePanel );
3207
+ showStatusBar ( mConfig .ui .showStatusBar );
3208
+ initProjectTreeViewUI ();
3209
+ }
3210
+
3202
3211
mProjectViewEmptyCont ->setVisible ( path == getPlaygroundPath () );
3203
3212
mProjectTreeView ->setVisible ( !mProjectViewEmptyCont ->isVisible () );
3204
3213
0 commit comments