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:
Martín Lucas Golini
2022-02-27 20:29:01 -03:00
parent a54da7d6da
commit 99110d6bef
10 changed files with 73 additions and 28 deletions

View File

@@ -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( "." );