mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-02 03:15:35 +00:00
Fix some issues detected by coverity for the editor.
This commit is contained in:
parent
2fef8948f1
commit
91fd966146
3 changed files with 6 additions and 2 deletions
|
@ -15,6 +15,7 @@ namespace CSMPrefs
|
||||||
ModifierSetting::ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ModifierSetting::ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label)
|
const std::string& label)
|
||||||
: Setting(parent, values, mutex, key, label)
|
: Setting(parent, values, mutex, key, label)
|
||||||
|
, mButton(0)
|
||||||
, mEditorActive(false)
|
, mEditorActive(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace CSMPrefs
|
||||||
ShortcutSetting::ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ShortcutSetting::ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label)
|
const std::string& label)
|
||||||
: Setting(parent, values, mutex, key, label)
|
: Setting(parent, values, mutex, key, label)
|
||||||
|
, mButton(0)
|
||||||
, mEditorActive(false)
|
, mEditorActive(false)
|
||||||
, mEditorPos(0)
|
, mEditorPos(0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,9 @@ osg::Vec3f CSVRender::InstanceMode::getSelectionCenter(const std::vector<osg::re
|
||||||
++objectCount;
|
++objectCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
center /= objectCount;
|
|
||||||
|
if (objectCount > 0)
|
||||||
|
center /= objectCount;
|
||||||
|
|
||||||
return center;
|
return center;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +94,7 @@ osg::Vec3f CSVRender::InstanceMode::getScreenCoords(const osg::Vec3f& pos)
|
||||||
CSVRender::InstanceMode::InstanceMode (WorldspaceWidget *worldspaceWidget, QWidget *parent)
|
CSVRender::InstanceMode::InstanceMode (WorldspaceWidget *worldspaceWidget, QWidget *parent)
|
||||||
: EditMode (worldspaceWidget, QIcon (":placeholder"), Mask_Reference, "Instance editing",
|
: EditMode (worldspaceWidget, QIcon (":placeholder"), Mask_Reference, "Instance editing",
|
||||||
parent), mSubMode (0), mSubModeId ("move"), mSelectionMode (0), mDragMode (DragMode_None),
|
parent), mSubMode (0), mSubModeId ("move"), mSelectionMode (0), mDragMode (DragMode_None),
|
||||||
mDragAxis (-1), mLocked (false)
|
mDragAxis (-1), mLocked (false), mUnitScaleDist(1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue