mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-16 06:18:43 +00:00
Fixed: #1193 Settings of "remap extensions" loads from settings file.
This commit is contained in:
parent
5b4c5204c7
commit
00ea8b5a24
6 changed files with 11 additions and 6 deletions
|
@ -78,6 +78,7 @@ const char * const SEARCH_PATHS = "SearchPaths";
|
|||
const char * const RECURSIVE_SEARCH_PATHS = "RecursiveSearchPathes";
|
||||
const char * const LEVELDESIGN_PATH = "LevelDesignPath";
|
||||
const char * const ASSETS_PATH = "AssetsPath";
|
||||
const char * const REMAP_EXTENSIONS = "RemapExtensions";
|
||||
|
||||
//resources
|
||||
const char * const ICON_NEL = ":/core/images/nel.png";
|
||||
|
|
|
@ -92,17 +92,20 @@ void CSearchPathsSettingsPage::finish()
|
|||
|
||||
void CSearchPathsSettingsPage::applySearchPaths()
|
||||
{
|
||||
QStringList paths;
|
||||
QStringList paths, remapExt;
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
||||
paths = settings->value(Core::Constants::SEARCH_PATHS).toStringList();
|
||||
remapExt = settings->value(Core::Constants::REMAP_EXTENSIONS).toStringList();
|
||||
settings->endGroup();
|
||||
|
||||
for (int i = 1; i < remapExt.size(); i += 2)
|
||||
NLMISC::CPath::remapExtension(remapExt.at(i - 1).toStdString(), remapExt.at(i).toStdString(), true);
|
||||
|
||||
Q_FOREACH(QString path, paths)
|
||||
{
|
||||
NLMISC::CPath::addSearchPath(path.toStdString(), false, false);
|
||||
}
|
||||
NLMISC::CPath::remapExtension("png", "tga", true);
|
||||
NLMISC::CPath::remapExtension("png", "dds", true);
|
||||
}
|
||||
|
||||
void CSearchPathsSettingsPage::addPath()
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
void apply();
|
||||
void finish();
|
||||
|
||||
// Set of the search paths(not recursive) and the remap extensions (loading from settings file)
|
||||
void applySearchPaths();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
Loading…
Reference in a new issue