GUI: don't warn while loop start/end focused
very ugly workaround to #2587
This commit is contained in:
parent
5e0cd830f1
commit
d243bafc6f
|
@ -8867,6 +8867,8 @@ FurnaceGUI::FurnaceGUI():
|
||||||
sampleDragMode(false),
|
sampleDragMode(false),
|
||||||
sampleDrag16(false),
|
sampleDrag16(false),
|
||||||
sampleZoomAuto(true),
|
sampleZoomAuto(true),
|
||||||
|
sampleCheckLoopStart(true),
|
||||||
|
sampleCheckLoopEnd(true),
|
||||||
sampleSelTarget(0),
|
sampleSelTarget(0),
|
||||||
sampleDragTarget(NULL),
|
sampleDragTarget(NULL),
|
||||||
sampleDragStart(0,0),
|
sampleDragStart(0,0),
|
||||||
|
|
|
@ -2583,6 +2583,7 @@ class FurnaceGUI {
|
||||||
int sampleSelStart, sampleSelEnd;
|
int sampleSelStart, sampleSelEnd;
|
||||||
bool sampleInfo, sampleCompatRate;
|
bool sampleInfo, sampleCompatRate;
|
||||||
bool sampleDragActive, sampleDragMode, sampleDrag16, sampleZoomAuto;
|
bool sampleDragActive, sampleDragMode, sampleDrag16, sampleZoomAuto;
|
||||||
|
bool sampleCheckLoopStart, sampleCheckLoopEnd;
|
||||||
// 0: start
|
// 0: start
|
||||||
// 1: end
|
// 1: end
|
||||||
unsigned char sampleSelTarget;
|
unsigned char sampleSelTarget;
|
||||||
|
|
|
@ -733,7 +733,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
}
|
}
|
||||||
popWarningColor();
|
popWarningColor();
|
||||||
|
|
||||||
pushWarningColor(!warnLoopPos.empty() || !warnLoopStart.empty());
|
pushWarningColor(!warnLoopPos.empty() || (!warnLoopStart.empty() && sampleCheckLoopStart));
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
ImGui::Text(_("Start"));
|
ImGui::Text(_("Start"));
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -752,8 +752,11 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemActive()) {
|
if (ImGui::IsItemActive()) {
|
||||||
keepLoopAlive=true;
|
keepLoopAlive=true;
|
||||||
|
sampleCheckLoopStart=false;
|
||||||
|
} else {
|
||||||
|
sampleCheckLoopStart=true;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || !warnLoopStart.empty() || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || (!warnLoopStart.empty() && sampleCheckLoopStart) || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||||
if (ImGui::BeginTooltip()) {
|
if (ImGui::BeginTooltip()) {
|
||||||
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||||
ImGui::Text(_("changing the loop in a BRR sample may result in glitches!"));
|
ImGui::Text(_("changing the loop in a BRR sample may result in glitches!"));
|
||||||
|
@ -769,7 +772,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
}
|
}
|
||||||
popWarningColor();
|
popWarningColor();
|
||||||
|
|
||||||
pushWarningColor(!warnLoopPos.empty() || !warnLoopEnd.empty());
|
pushWarningColor(!warnLoopPos.empty() || (!warnLoopEnd.empty() && sampleCheckLoopEnd));
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
ImGui::Text(_("End"));
|
ImGui::Text(_("End"));
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -788,8 +791,11 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemActive()) {
|
if (ImGui::IsItemActive()) {
|
||||||
keepLoopAlive=true;
|
keepLoopAlive=true;
|
||||||
|
sampleCheckLoopEnd=false;
|
||||||
|
} else {
|
||||||
|
sampleCheckLoopEnd=true;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || !warnLoopEnd.empty() || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || (!warnLoopEnd.empty() && sampleCheckLoopEnd) || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||||
if (ImGui::BeginTooltip()) {
|
if (ImGui::BeginTooltip()) {
|
||||||
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||||
ImGui::Text(_("changing the loop in a BRR sample may result in glitches!"));
|
ImGui::Text(_("changing the loop in a BRR sample may result in glitches!"));
|
||||||
|
|
Loading…
Reference in a new issue