mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 10:36:30 +03:00
eepp: Allow selecting multiple files in UIFileDialog.
ecode: Allow opening multiple files from "Open File" (SpartanJ/ecode#252).
This commit is contained in:
@@ -216,10 +216,13 @@ void App::openFileDialog() {
|
||||
dialog->setTitle( i18n( "open_file", "Open File" ) );
|
||||
dialog->setCloseShortcut( KEY_ESCAPE );
|
||||
dialog->setSingleClickNavigation( mConfig.editor.singleClickNavigation );
|
||||
dialog->setAllowsMultiFileSelect( true );
|
||||
dialog->on( Event::OpenFile, [this]( const Event* event ) {
|
||||
auto file = event->getNode()->asType<UIFileDialog>()->getFullPath();
|
||||
mLastFileFolder = FileSystem::fileRemoveFileName( file );
|
||||
loadFileFromPath( file );
|
||||
auto files = event->getNode()->asType<UIFileDialog>()->getFullPaths();
|
||||
for ( const auto& file : files ) {
|
||||
mLastFileFolder = FileSystem::fileRemoveFileName( file );
|
||||
loadFileFromPath( file );
|
||||
}
|
||||
} );
|
||||
dialog->on( Event::OnWindowClose, [this]( const Event* ) {
|
||||
if ( mSplitter && mSplitter->getCurWidget() && !SceneManager::instance()->isShuttingDown() )
|
||||
|
||||
Reference in New Issue
Block a user