Changed: #1193 Code cleanup.

This commit is contained in:
dnk-88 2011-01-22 16:50:27 +02:00
parent 91c9b7d06a
commit c520ed900f
4 changed files with 9 additions and 10 deletions

View file

@ -218,7 +218,7 @@ void CConfiguration::cfcbSearchPaths(NLMISC::CConfigFile::CVar &var)
{
uint varsize = var.size();
for (uint i = 0; i < varsize; ++i)
CPath::addSearchPath(var.asString(i), true, false);
CPath::addSearchPath(var.asString(i), false, false);
}
} /* namespace NLQT */

View file

@ -105,7 +105,7 @@ CMainWindow::CMainWindow(QWidget *parent)
connect(_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender()));
// timer->start(); // <- timeout 0
// it's heavy on cpu, though, when no 3d driver initialized :)
_mainTimer->start(20); // 25fps
_mainTimer->start(23); // 25fps
_statusBarTimer = new QTimer(this);
connect(_statusBarTimer, SIGNAL(timeout()), this, SLOT(updateStatusBar()));
@ -709,7 +709,7 @@ void CMainWindow::updateRender()
if (_isGraphicsInitialized && !Modules::objView().getDriver()->isLost())
{
// 01. Render Driver (background color)
Modules::objView().getDriver()->activate();
//Modules::objView().getDriver()->activate();
Modules::objView().renderDriver(); // clear all buffers
// 02. Render Sky (sky scene)

View file

@ -264,11 +264,14 @@ bool CObjectViewer::loadMesh(const std::string &meshFileName, const std::string
if (_Entities.count(fileName) != 0)
return false;
CPath::addSearchPath(CFile::getPath(meshFileName));
CPath::addSearchPath(CFile::getPath(meshFileName), false, false);
// create instance of the mesh character
UInstance Entity = _Scene->createInstance(meshFileName);
// if we can't create entity, skip it
if (Entity.empty()) return false;
CAABBox bbox;
Entity.getShapeAABBox(bbox);
setCamera(bbox , Entity, true);
@ -277,9 +280,6 @@ bool CObjectViewer::loadMesh(const std::string &meshFileName, const std::string
USkeleton Skeleton = _Scene->createSkeleton(skelFileName);
// if we can't create entity, skip it
if (Entity.empty()) return false;
// TODO: remade at typedef std::map<std::string, *CEntity> CEntities;
EIT eit = (_Entities.insert (make_pair (fileName, CEntity()))).first;
CEntity &entity = (*eit).second;

View file

@ -22,9 +22,6 @@
#include <QtGui/QHeaderView>
#include <QtGui/QPushButton>
namespace Core
{
struct PageData
{
int index;
@ -34,6 +31,8 @@ struct PageData
Q_DECLARE_METATYPE(PageData);
namespace Core
{
CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
const QString &categoryId,
const QString &pageId,