mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix icons path for macOS if editor started from installed package
This commit is contained in:
parent
4674e240d8
commit
3a49bc6f8b
@ -120,6 +120,10 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
ui(new Ui::MainWindow),
|
ui(new Ui::MainWindow),
|
||||||
controller(this)
|
controller(this)
|
||||||
{
|
{
|
||||||
|
// Set current working dir to executable folder.
|
||||||
|
// This is important on Mac for relative paths to work inside DMG.
|
||||||
|
QDir::setCurrent(QApplication::applicationDirPath());
|
||||||
|
|
||||||
for(auto & string : VCMIDirs::get().dataPaths())
|
for(auto & string : VCMIDirs::get().dataPaths())
|
||||||
QDir::addSearchPath("icons", pathToQString(string / "mapeditor" / "icons"));
|
QDir::addSearchPath("icons", pathToQString(string / "mapeditor" / "icons"));
|
||||||
QDir::addSearchPath("icons", pathToQString(VCMIDirs::get().userDataPath() / "mapeditor" / "icons"));
|
QDir::addSearchPath("icons", pathToQString(VCMIDirs::get().userDataPath() / "mapeditor" / "icons"));
|
||||||
@ -128,10 +132,6 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
loadUserSettings(); //For example window size
|
loadUserSettings(); //For example window size
|
||||||
setTitle();
|
setTitle();
|
||||||
|
|
||||||
// Set current working dir to executable folder.
|
|
||||||
// This is important on Mac for relative paths to work inside DMG.
|
|
||||||
QDir::setCurrent(QApplication::applicationDirPath());
|
|
||||||
|
|
||||||
ExtractionOptions extractionOptions;
|
ExtractionOptions extractionOptions;
|
||||||
parseCommandLine(extractionOptions);
|
parseCommandLine(extractionOptions);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user