Explorar o código

Add icons into search path

nordsoft %!s(int64=2) %!d(string=hai) anos
pai
achega
4b8403be4b
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      mapeditor/mainwindow.cpp

+ 4 - 0
mapeditor/mainwindow.cpp

@@ -120,6 +120,10 @@ MainWindow::MainWindow(QWidget* parent) :
 	ui(new Ui::MainWindow),
 	ui(new Ui::MainWindow),
 	controller(this)
 	controller(this)
 {
 {
+	for(auto & string : VCMIDirs::get().dataPaths())
+		QDir::addSearchPath("icons", pathToQString(string / "mapeditor" / "icons"));
+	QDir::addSearchPath("icons", pathToQString(VCMIDirs::get().userDataPath() / "mapeditor" / "icons"));
+	
 	ui->setupUi(this);
 	ui->setupUi(this);
 	loadUserSettings(); //For example window size
 	loadUserSettings(); //For example window size
 	setTitle();
 	setTitle();