mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 16:15:31 +00:00
Update marker transparency when changed.
This commit is contained in:
parent
de214db8d4
commit
556117f6e6
2 changed files with 15 additions and 0 deletions
|
@ -51,6 +51,7 @@ CSVRender::WorldspaceWidget::WorldspaceWidget (CSMDoc::Document& document, QWidg
|
||||||
, mToolTipPos (-1, -1)
|
, mToolTipPos (-1, -1)
|
||||||
, mShowToolTips(false)
|
, mShowToolTips(false)
|
||||||
, mToolTipDelay(0)
|
, mToolTipDelay(0)
|
||||||
|
, mInConstructor(true)
|
||||||
{
|
{
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
|
@ -114,6 +115,8 @@ CSVRender::WorldspaceWidget::WorldspaceWidget (CSMDoc::Document& document, QWidg
|
||||||
|
|
||||||
CSMPrefs::Shortcut* abortShortcut = new CSMPrefs::Shortcut("scene-edit-abort", this);
|
CSMPrefs::Shortcut* abortShortcut = new CSMPrefs::Shortcut("scene-edit-abort", this);
|
||||||
connect(abortShortcut, SIGNAL(activated()), this, SLOT(abortDrag()));
|
connect(abortShortcut, SIGNAL(activated()), this, SLOT(abortDrag()));
|
||||||
|
|
||||||
|
mInConstructor = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSVRender::WorldspaceWidget::~WorldspaceWidget ()
|
CSVRender::WorldspaceWidget::~WorldspaceWidget ()
|
||||||
|
@ -128,6 +131,17 @@ void CSVRender::WorldspaceWidget::settingChanged (const CSMPrefs::Setting *setti
|
||||||
mDragWheelFactor = setting->toDouble();
|
mDragWheelFactor = setting->toDouble();
|
||||||
else if (*setting=="3D Scene Input/drag-shift-factor")
|
else if (*setting=="3D Scene Input/drag-shift-factor")
|
||||||
mDragShiftFactor = setting->toDouble();
|
mDragShiftFactor = setting->toDouble();
|
||||||
|
else if (*setting=="3D Scene Input/object-marker-alpha" && !mInConstructor)
|
||||||
|
{
|
||||||
|
float alpha = setting->toDouble();
|
||||||
|
// getSelection is virtual, thus this can not be called from the constructor
|
||||||
|
auto selection = getSelection(Mask_Reference);
|
||||||
|
for (osg::ref_ptr<TagBase> tag : selection)
|
||||||
|
{
|
||||||
|
if (auto objTag = dynamic_cast<ObjectTag*>(tag.get()))
|
||||||
|
objTag->mObject->setMarkerTransparency(alpha);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (*setting=="Tooltips/scene-delay")
|
else if (*setting=="Tooltips/scene-delay")
|
||||||
mToolTipDelay = setting->toInt();
|
mToolTipDelay = setting->toInt();
|
||||||
else if (*setting=="Tooltips/scene")
|
else if (*setting=="Tooltips/scene")
|
||||||
|
|
|
@ -65,6 +65,7 @@ namespace CSVRender
|
||||||
QPoint mToolTipPos;
|
QPoint mToolTipPos;
|
||||||
bool mShowToolTips;
|
bool mShowToolTips;
|
||||||
int mToolTipDelay;
|
int mToolTipDelay;
|
||||||
|
bool mInConstructor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue