Improvements when opening binary files from drag and drop and from the tree-view (SpartanJ/ecode#589).

Fixes a bug that prevented signature help to not be displayed.
This commit is contained in:
Martín Lucas Golini
2025-07-13 19:22:31 -03:00
parent 8a8384ca59
commit 2df4e88836
8 changed files with 152 additions and 26 deletions

View File

@@ -1,4 +1,5 @@
#include "settingsmenu.hpp"
#include <filesystem>
namespace fs = std::filesystem;
@@ -2354,7 +2355,7 @@ void SettingsMenu::createProjectTreeMenu( const FileInfo& file ) {
} else if ( "new_folder" == id ) {
mApp->newFolder( file );
} else if ( "open_file" == id ) {
mApp->loadFileFromPath( file.getFilepath() );
mApp->openFileFromPath( file.getFilepath() );
} else if ( "remove" == id ) {
deleteFileDialog( file );
} else if ( "duplicate_file" == id ) {
@@ -2552,8 +2553,8 @@ UIMenu* SettingsMenu::createFontHintMenu() {
const auto fontHintMenuRefresh = [this] {
const auto& cfg = mApp->getConfig();
auto el =
mFontHintMenu->find( "hint_" + FontTrueType::fontHintingToString( cfg.ui.fontHinting ) );
auto el = mFontHintMenu->find( "hint_" +
FontTrueType::fontHintingToString( cfg.ui.fontHinting ) );
if ( el && el->isType( UI_TYPE_MENURADIOBUTTON ) )
el->asType<UIMenuRadioButton>()->setActive( true );
};