mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-06 04:44:32 -05:00
Fix NameUsed() of source and scene selection widgets
Would always return false as the variable would already be deleted whenever NameUsed() was called
This commit is contained in:
parent
8cd818b80e
commit
dd572a7456
|
|
@ -432,13 +432,8 @@ bool SceneSelectionWidget::NameUsed(const QString &name)
|
|||
_currentSelection._group->name == name.toStdString()) {
|
||||
return true;
|
||||
}
|
||||
if (_currentSelection._type == SceneSelection::Type::VARIABLE) {
|
||||
auto var = _currentSelection._variable.lock();
|
||||
if (var && var->Name() == name.toStdString()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return _currentSelection._type == SceneSelection::Type::VARIABLE &&
|
||||
currentText() == name;
|
||||
}
|
||||
|
||||
void SceneSelectionWidget::ItemRemove(const QString &name)
|
||||
|
|
|
|||
|
|
@ -240,13 +240,8 @@ void SourceSelectionWidget::ItemAdd(const QString &)
|
|||
|
||||
bool SourceSelectionWidget::NameUsed(const QString &name)
|
||||
{
|
||||
if (_currentSelection._type == SourceSelection::Type::VARIABLE) {
|
||||
auto var = _currentSelection._variable.lock();
|
||||
if (var && var->Name() == name.toStdString()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return _currentSelection._type == SourceSelection::Type::VARIABLE &&
|
||||
currentText() == name;
|
||||
}
|
||||
|
||||
void SourceSelectionWidget::ItemRemove(const QString &name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user