mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Added ConditionalLock.
Fixed a bug in ActionManager. Fixed some bugs on UITableView and UITreeView. Fixed a dead-lock un AutoCompleteModule.
This commit is contained in:
@@ -1920,22 +1920,28 @@ void App::initProjectTreeView( const std::string& path ) {
|
||||
return 1;
|
||||
} );
|
||||
|
||||
if ( !path.empty() && FileSystem::fileExists( path ) ) {
|
||||
if ( !path.empty() ) {
|
||||
if ( FileSystem::isDirectory( path ) ) {
|
||||
loadFolder( path );
|
||||
} else {
|
||||
std::string rpath( FileSystem::getRealPath( path ) );
|
||||
std::string folderPath( FileSystem::fileRemoveFileName( rpath ) );
|
||||
|
||||
mFileSystemModel = FileSystemModel::New( FileSystem::fileRemoveFileName( rpath ),
|
||||
FileSystemModel::Mode::FilesAndDirectories,
|
||||
{ true, true, true } );
|
||||
if ( FileSystem::isDirectory( folderPath ) ) {
|
||||
mFileSystemModel = FileSystemModel::New(
|
||||
folderPath, FileSystemModel::Mode::FilesAndDirectories, { true, true, true } );
|
||||
|
||||
mProjectTreeView->setModel( mFileSystemModel );
|
||||
mProjectTreeView->setModel( mFileSystemModel );
|
||||
|
||||
if ( mFileSystemListener )
|
||||
mFileSystemListener->setFileSystemModel( mFileSystemModel );
|
||||
if ( mFileSystemListener )
|
||||
mFileSystemListener->setFileSystemModel( mFileSystemModel );
|
||||
|
||||
loadFileFromPath( rpath, false );
|
||||
if ( FileSystem::fileExists( rpath ) ) {
|
||||
loadFileFromPath( rpath, false );
|
||||
} else if ( FileSystem::fileCanWrite( folderPath ) ) {
|
||||
loadFileFromPath( path, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
loadFolder( "." );
|
||||
|
||||
Reference in New Issue
Block a user