Fixes #4841
This commit is contained in:
@@ -552,8 +552,8 @@ QString RawSource::toString(const ModelData * model, const GeneralSettings * con
|
|||||||
result = QString(generalSettings->potName[genAryIdx]);
|
result = QString(generalSettings->potName[genAryIdx]);
|
||||||
else if (isSlider(&genAryIdx))
|
else if (isSlider(&genAryIdx))
|
||||||
result = QString(generalSettings->sliderName[genAryIdx]);
|
result = QString(generalSettings->sliderName[genAryIdx]);
|
||||||
else
|
else if (isStick(&genAryIdx))
|
||||||
result = QString(generalSettings->stickName[index]);
|
result = QString(generalSettings->stickName[genAryIdx]);
|
||||||
}
|
}
|
||||||
if (result.isEmpty())
|
if (result.isEmpty())
|
||||||
result = getCurrentFirmware()->getAnalogInputName(index);;
|
result = getCurrentFirmware()->getAnalogInputName(index);;
|
||||||
@@ -608,6 +608,16 @@ QString RawSource::toString(const ModelData * model, const GeneralSettings * con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RawSource::isStick(int * stickIndex) const
|
||||||
|
{
|
||||||
|
if (type == SOURCE_TYPE_STICK && index < getBoardCapability(getCurrentBoard(), Board::Sticks)) {
|
||||||
|
if (stickIndex)
|
||||||
|
*stickIndex = index;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool RawSource::isPot(int * potsIndex) const
|
bool RawSource::isPot(int * potsIndex) const
|
||||||
{
|
{
|
||||||
if (type == SOURCE_TYPE_STICK &&
|
if (type == SOURCE_TYPE_STICK &&
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ class RawSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isTimeBased() const;
|
bool isTimeBased() const;
|
||||||
|
bool isStick(int * potsIndex = NULL) const;
|
||||||
bool isPot(int * potsIndex = NULL) const;
|
bool isPot(int * potsIndex = NULL) const;
|
||||||
bool isSlider(int * sliderIndex = NULL) const;
|
bool isSlider(int * sliderIndex = NULL) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user