Skip to content

Commit

Permalink
Fix for issue #92.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed Mar 6, 2025
1 parent 7738a85 commit 5923fd5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/tools/ecode/ecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,7 @@ App::getForcePositionFn( TextPosition initialPosition ) {
return forcePosition;
}

void App::initProjectTreeView( std::string path, bool openClean ) {
void App::initProjectTreeViewUI() {
mProjectViewEmptyCont = mUISceneNode->find<UILinearLayout>( "project_view_empty" );
mProjectViewEmptyCont->find<UIPushButton>( "open_folder" )
->on( Event::MouseClick, [this]( const Event* event ) {
Expand Down Expand Up @@ -2999,6 +2999,12 @@ void App::initProjectTreeView( std::string path, bool openClean ) {
}
}
} );
mProjectTreeView->setDisableCellClipping( true );
mProjectTreeView->setAutoExpandOnSingleColumn( true );
}

void App::initProjectTreeView( std::string path, bool openClean ) {
initProjectTreeViewUI();

bool hasPosition = pathHasPosition( path );
TextPosition initialPosition;
Expand Down Expand Up @@ -3069,9 +3075,6 @@ void App::initProjectTreeView( std::string path, bool openClean ) {
mStatusBar->setVisible( false );
}
}

mProjectTreeView->setDisableCellClipping( true );
mProjectTreeView->setAutoExpandOnSingleColumn( true );
}

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

if ( !mProjectTreeView ) {
showSidePanel( mConfig.ui.showSidePanel );
showStatusBar( mConfig.ui.showStatusBar );
initProjectTreeViewUI();
}

mProjectViewEmptyCont->setVisible( path == getPlaygroundPath() );
mProjectTreeView->setVisible( !mProjectViewEmptyCont->isVisible() );

Expand Down
2 changes: 2 additions & 0 deletions src/tools/ecode/ecode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ class App : public UICodeEditorSplitter::Client, public PluginContextProvider {

void initLocateBar();

void initProjectTreeViewUI();

void initProjectTreeView( std::string path, bool openClean );

void initImageView();
Expand Down

0 comments on commit 5923fd5

Please sign in to comment.