Skip to content

Commit 5923fd5

Browse files
committed
Fix for issue #92.
1 parent 7738a85 commit 5923fd5

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

Diff for: src/tools/ecode/ecode.cpp

+13-4
Original file line numberDiff line numberDiff line change
@@ -2925,7 +2925,7 @@ App::getForcePositionFn( TextPosition initialPosition ) {
29252925
return forcePosition;
29262926
}
29272927

2928-
void App::initProjectTreeView( std::string path, bool openClean ) {
2928+
void App::initProjectTreeViewUI() {
29292929
mProjectViewEmptyCont = mUISceneNode->find<UILinearLayout>( "project_view_empty" );
29302930
mProjectViewEmptyCont->find<UIPushButton>( "open_folder" )
29312931
->on( Event::MouseClick, [this]( const Event* event ) {
@@ -2999,6 +2999,12 @@ void App::initProjectTreeView( std::string path, bool openClean ) {
29992999
}
30003000
}
30013001
} );
3002+
mProjectTreeView->setDisableCellClipping( true );
3003+
mProjectTreeView->setAutoExpandOnSingleColumn( true );
3004+
}
3005+
3006+
void App::initProjectTreeView( std::string path, bool openClean ) {
3007+
initProjectTreeViewUI();
30023008

30033009
bool hasPosition = pathHasPosition( path );
30043010
TextPosition initialPosition;
@@ -3069,9 +3075,6 @@ void App::initProjectTreeView( std::string path, bool openClean ) {
30693075
mStatusBar->setVisible( false );
30703076
}
30713077
}
3072-
3073-
mProjectTreeView->setDisableCellClipping( true );
3074-
mProjectTreeView->setAutoExpandOnSingleColumn( true );
30753078
}
30763079

30773080
void App::initImageView() {
@@ -3199,6 +3202,12 @@ void App::loadFolder( std::string path ) {
31993202
mStatusBar->setVisible( mConfig.ui.showStatusBar );
32003203
}
32013204

3205+
if ( !mProjectTreeView ) {
3206+
showSidePanel( mConfig.ui.showSidePanel );
3207+
showStatusBar( mConfig.ui.showStatusBar );
3208+
initProjectTreeViewUI();
3209+
}
3210+
32023211
mProjectViewEmptyCont->setVisible( path == getPlaygroundPath() );
32033212
mProjectTreeView->setVisible( !mProjectViewEmptyCont->isVisible() );
32043213

Diff for: src/tools/ecode/ecode.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ class App : public UICodeEditorSplitter::Client, public PluginContextProvider {
592592

593593
void initLocateBar();
594594

595+
void initProjectTreeViewUI();
596+
595597
void initProjectTreeView( std::string path, bool openClean );
596598

597599
void initImageView();

0 commit comments

Comments
 (0)