* Increase update frequency of AutoUpdateTooltipLabel
* Prevent crash in TempVariableRef::PostLoad()
* Ensure that correct widget is passed for MacroSelection connections
This commit is contained in:
WarmUpTill 2024-06-17 22:03:49 +02:00 committed by WarmUpTill
parent 3bc15e585c
commit 7702541d81
2 changed files with 10 additions and 4 deletions

View File

@ -19,11 +19,13 @@ MacroSelection::MacroSelection(QWidget *parent)
addItem(QString::fromStdString(m->Name()));
}
QWidget::connect(parent, SIGNAL(MacroAdded(const QString &)), this,
QWidget::connect(GetSettingsWindow(),
SIGNAL(MacroAdded(const QString &)), this,
SLOT(MacroAdd(const QString &)));
QWidget::connect(parent, SIGNAL(MacroRemoved(const QString &)), this,
QWidget::connect(GetSettingsWindow(),
SIGNAL(MacroRemoved(const QString &)), this,
SLOT(MacroRemove(const QString &)));
QWidget::connect(parent,
QWidget::connect(GetSettingsWindow(),
SIGNAL(MacroRenamed(const QString &, const QString &)),
this,
SLOT(MacroRename(const QString &, const QString &)));

View File

@ -182,6 +182,10 @@ void TempVariableRef::Load(obs_data_t *obj, Macro *macro, const char *name)
void TempVariableRef::PostLoad(int idx, SegmentType type, Macro *macro)
{
if (!macro) {
return;
}
std::deque<std::shared_ptr<MacroSegment>> segments;
switch (type) {
case SegmentType::NONE:
@ -458,7 +462,7 @@ void AutoUpdateTooltipLabel::enterEvent(QEnterEvent *event)
void AutoUpdateTooltipLabel::enterEvent(QEvent *event)
#endif
{
_timer->start(1000);
_timer->start(300);
QLabel::enterEvent(event);
}