mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 17:17:42 +03:00
Improved StlysheetLength implementation and added two new unit types dprd and dpru.
Improved Tabs visibility when they are closable. Fix minor bug in ProjectDirectoryTree. Fixed a regression on UINodeDrawable.
This commit is contained in:
@@ -15,12 +15,14 @@ ProjectDirectoryTree::ProjectDirectoryTree( const std::string& path,
|
||||
mRunning( false ),
|
||||
mIsReady( false ),
|
||||
mIgnoreHidden( true ),
|
||||
mClosing( false ),
|
||||
mIgnoreMatcher( path ),
|
||||
mApp( app ) {
|
||||
FileSystem::dirAddSlashAtEnd( mPath );
|
||||
}
|
||||
|
||||
ProjectDirectoryTree::~ProjectDirectoryTree() {
|
||||
mClosing = true;
|
||||
if ( mApp->getPluginManager() )
|
||||
mApp->getPluginManager()->unsubscribeMessages( "ProjectDirectoryTree" );
|
||||
Lock rl( mMatchingMutex );
|
||||
@@ -28,6 +30,9 @@ ProjectDirectoryTree::~ProjectDirectoryTree() {
|
||||
mRunning = false;
|
||||
Lock l( mFilesMutex );
|
||||
}
|
||||
{
|
||||
Lock l( mDoneMutex );
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectDirectoryTree::scan( const ProjectDirectoryTree::ScanCompleteEvent& scanComplete,
|
||||
@@ -76,7 +81,6 @@ void ProjectDirectoryTree::scan( const ProjectDirectoryTree::ScanCompleteEvent&
|
||||
mAllowedMatcher.get() );
|
||||
}
|
||||
mIsReady = true;
|
||||
mRunning = false;
|
||||
mApp->getPluginManager()->subscribeMessages(
|
||||
"ProjectDirectoryTree", [this]( const PluginMessage& msg ) -> PluginRequestHandle {
|
||||
return processMessage( msg );
|
||||
@@ -88,8 +92,11 @@ void ProjectDirectoryTree::scan( const ProjectDirectoryTree::ScanCompleteEvent&
|
||||
#if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN || defined( __EMSCRIPTEN_PTHREADS__ )
|
||||
},
|
||||
[scanComplete, this]( const auto& ) {
|
||||
if ( scanComplete )
|
||||
if ( !mClosing && scanComplete ) {
|
||||
Lock l( mDoneMutex );
|
||||
scanComplete( *this );
|
||||
}
|
||||
mRunning = false;
|
||||
} );
|
||||
#endif
|
||||
}
|
||||
@@ -324,7 +331,8 @@ void ProjectDirectoryTree::tryAddFile( const FileInfo& file ) {
|
||||
}
|
||||
if ( foundPattern ) {
|
||||
Lock l( mFilesMutex );
|
||||
auto exists = std::find( mFiles.begin(), mFiles.end(), file.getFilepath() ) != mFiles.end();
|
||||
auto exists =
|
||||
std::find( mFiles.begin(), mFiles.end(), file.getFilepath() ) != mFiles.end();
|
||||
if ( !exists ) {
|
||||
mFiles.emplace_back( file.getFilepath() );
|
||||
mNames.emplace_back( file.getFileName() );
|
||||
|
||||
Reference in New Issue
Block a user