1
0
mirror of synced 2024-11-28 09:30:51 +01:00

Added command line support / dropping files onto executable

Closes #36
This commit is contained in:
WerWolv 2020-12-05 22:10:03 +01:00
parent 63696b9f5f
commit 7b8330f8f8
2 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,9 @@ int main(int argc, char **argv) {
window.addView<hex::ViewTools>(dataProvider);
window.addView<hex::ViewHelp>();
if (argc > 1)
hex::View::postEvent(hex::Events::FileDropped, argv[1]);
window.loop();
return 0;

View File

@ -466,6 +466,8 @@ namespace hex {
if (this->m_dataProvider->isAvailable())
ProjectFile::setFilePath(path);
this->getWindowOpenState() = true;
View::postEvent(Events::FileLoaded);
View::postEvent(Events::DataChanged);
ProjectFile::markDirty();