fix refPlayer cue input time error false positive
This commit is contained in:
parent
907ad14a98
commit
32dacdcd65
1 changed files with 5 additions and 2 deletions
|
|
@ -109,17 +109,20 @@ void FurnaceGUI::drawRefPlayer() {
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Middle)) {
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Middle)) {
|
||||||
fp->setPos(0);
|
fp->setPos(0);
|
||||||
}
|
}
|
||||||
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
|
TimeMicros cueTime=e->getFilePlayerCue();
|
||||||
|
fpCueInput=cueTime.toString(-1,TA_TIME_FORMAT_AUTO);
|
||||||
|
}
|
||||||
if (ImGui::BeginPopupContextItem("Edit Cue Position",ImGuiPopupFlags_MouseButtonRight)) {
|
if (ImGui::BeginPopupContextItem("Edit Cue Position",ImGuiPopupFlags_MouseButtonRight)) {
|
||||||
ImGui::TextUnformatted(_("Set cue position at first order:"));
|
ImGui::TextUnformatted(_("Set cue position at first order:"));
|
||||||
TimeMicros cueTime=e->getFilePlayerCue();
|
TimeMicros cueTime=e->getFilePlayerCue();
|
||||||
bool altered=false;
|
bool altered=false;
|
||||||
fpCueInput=cueTime.toString(-1,TA_TIME_FORMAT_AUTO);
|
|
||||||
pushWarningColor(false,fpCueInputFailed);
|
pushWarningColor(false,fpCueInputFailed);
|
||||||
if (ImGui::InputText("##CuePos",&fpCueInput)) {
|
if (ImGui::InputText("##CuePos",&fpCueInput)) {
|
||||||
|
fpCueInputFailed=false;
|
||||||
try {
|
try {
|
||||||
cueTime=TimeMicros::fromString(fpCueInput);
|
cueTime=TimeMicros::fromString(fpCueInput);
|
||||||
altered=true;
|
altered=true;
|
||||||
fpCueInputFailed=false;
|
|
||||||
} catch (std::invalid_argument& e) {
|
} catch (std::invalid_argument& e) {
|
||||||
fpCueInputFailed=true;
|
fpCueInputFailed=true;
|
||||||
fpCueInputFailReason=e.what();
|
fpCueInputFailReason=e.what();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue