mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Allow zero duration when flying to globe position
Consistent with other fly to functions
This commit is contained in:
@@ -391,9 +391,8 @@ namespace {
|
||||
instruction.setValue("PathType", std::string("ZoomOutOverview"));
|
||||
|
||||
if (duration.has_value()) {
|
||||
constexpr double Epsilon = 1e-5;
|
||||
if (*duration <= Epsilon) {
|
||||
throw ghoul::lua::LuaError("Duration must be larger than zero");
|
||||
if (*duration < 0) {
|
||||
throw ghoul::lua::LuaError("Duration must be a positive value");
|
||||
}
|
||||
instruction.setValue("Duration", *duration);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user