forked from Mirrors/openclonk
Editor: Show full path name in sound delegate display string
parent
38cf275de7
commit
cd9d6f5c6f
|
@ -1832,6 +1832,13 @@ C4PropertyDelegateSound::C4PropertyDelegateSound(const C4PropertyDelegateFactory
|
|||
}
|
||||
}
|
||||
|
||||
QString C4PropertyDelegateSound::GetDisplayString(const C4Value &v, class C4Object *obj, bool short_names) const
|
||||
{
|
||||
// Always show full sound name
|
||||
C4String *val_string = v.getStr();
|
||||
return val_string ? QString(val_string->GetCStr()) : QString(v.GetDataString().getData());
|
||||
}
|
||||
|
||||
bool C4PropertyDelegateSound::IsPasteValid(const C4Value &val) const
|
||||
{
|
||||
// Must be nil or a string
|
||||
|
|
|
@ -446,6 +446,7 @@ class C4PropertyDelegateSound : public C4PropertyDelegateEnum
|
|||
{
|
||||
public:
|
||||
C4PropertyDelegateSound(const C4PropertyDelegateFactory *factory, C4PropList *props);
|
||||
QString GetDisplayString(const C4Value &v, class C4Object *obj, bool short_names) const override;
|
||||
bool IsPasteValid(const C4Value &val) const override;
|
||||
protected:
|
||||
C4StyledItemDelegateWithButton::ButtonType GetOptionComboBoxButtonType() const override { return C4StyledItemDelegateWithButton::BT_PlaySound; }
|
||||
|
|
Loading…
Reference in New Issue