Explorar el Código

Add icons into search path

nordsoft hace 2 años
padre
commit
4b8403be4b
Se han modificado 1 ficheros con 4 adiciones y 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),
 	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);
 	loadUserSettings(); //For example window size
 	setTitle();