mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-15 22:08: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:
|
||||
|
|
|
@ -38,7 +38,7 @@ QNLWidget::QNLWidget(QWidget *parent)
|
|||
m_initialized(false),
|
||||
m_interval(25)
|
||||
{
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
setAttribute(Qt::WA_PaintOnScreen);
|
||||
setMouseTracking(true);
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace NLQT
|
|||
CGraphicsViewport::CGraphicsViewport(QWidget *parent)
|
||||
: QNLWidget(parent)
|
||||
{
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
setAttribute(Qt::WA_PaintOnScreen);
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ void CParticleWorkspaceDialog::clickedItem(const QModelIndex & index)
|
|||
_treeModel->getOwnerNode(_currentItem)->getPSPointer()->setCurrentEditedElement(NULL);
|
||||
|
||||
_currentItem = static_cast<CParticleTreeItem *>(index.internalPointer());
|
||||
|
||||
|
||||
if (_currentItem == 0)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue