Skip to content

Commit

Permalink
Fixes issue SpartanJ/ecode#306.
Browse files Browse the repository at this point in the history
Updated efsw.
  • Loading branch information
SpartanJ committed Aug 4, 2024
1 parent 04065d9 commit 7c556ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/eepp/ui/uifiledialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class EE_API UIFileDialog : public UIWindow {

UITextInput* getFileInput() const;

UIDropDownList* getFiletypeList() const;
UIDropDownList* getFileTypeList() const;

void addFilePattern( std::string pattern, bool select = false );

Expand Down
14 changes: 10 additions & 4 deletions src/eepp/ui/uifiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ UIFileDialog::UIFileDialog( Uint32 dialogFlags, const std::string& defaultFilePa
if ( !FileSystem::fileExists( newFolderPath ) &&
FileSystem::makeDir( newFolderPath ) ) {
refreshFolder();

ModelIndex index =
mMultiView->getCurrentView()->findRowWithText( folderName, true, true );
if ( index.isValid() )
mMultiView->setSelection( index );
}

msgBox->closeWindow();
} );
}
} );
Expand Down Expand Up @@ -203,7 +210,7 @@ UIFileDialog::UIFileDialog( Uint32 dialogFlags, const std::string& defaultFilePa
mMultiView->getCurrentView()->setFocus();
mMultiView->getCurrentView()->forceKeyDown( *kevent );
}
});
} );

mButtonOpen = UIPushButton::New();
mButtonOpen
Expand Down Expand Up @@ -439,8 +446,7 @@ std::string UIFileDialog::getSelectedDrive() const {
ModelIndex index = getSelectionModelIndex();
ModelIndex modelIndex( mDiskDrivesModel->index( index.row(), DiskDrivesModel::Name ) );
Variant var( mDiskDrivesModel->data( modelIndex ) );
std::string drive( var.asCStr() );
return drive;
return var.toString();
}

void UIFileDialog::openFileOrFolder( bool shouldOpenFolder = false ) {
Expand Down Expand Up @@ -712,7 +718,7 @@ UITextInput* UIFileDialog::getFileInput() const {
return mFile;
}

UIDropDownList* UIFileDialog::getFiletypeList() const {
UIDropDownList* UIFileDialog::getFileTypeList() const {
return mFiletype;
}

Expand Down

0 comments on commit 7c556ad

Please sign in to comment.