mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 05:42:35 +00:00
Don't load local cyberarm_engine of building release, fixed FieldPlanner and DriverTeamRotationGenerator not excluded from 'no configuration loaded' redirect
This commit is contained in:
@@ -172,14 +172,11 @@ class Editor < CyberarmEngine::GuiState
|
|||||||
@status_bar.clear
|
@status_bar.clear
|
||||||
@body.clear
|
@body.clear
|
||||||
|
|
||||||
if window.backend.settings.config.empty?
|
if window.backend.settings.config.empty? && page_requires_configuration?(klass)
|
||||||
if [TAC::Pages::Home, TAC::Pages::TACNET, TAC::Pages::Simulator, TAC::Pages::Configurations].include?(klass)
|
push_state(TAC::Dialog::AlertDialog, title: "No Config Loaded", message: "A config must be loaded.")
|
||||||
else
|
page(TAC::Pages::Configurations)
|
||||||
push_state(TAC::Dialog::AlertDialog, title: "No Config Loaded", message: "A config must be loaded.")
|
|
||||||
page(TAC::Pages::Configurations)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@page.blur if @page
|
@page.blur if @page
|
||||||
@@ -191,4 +188,12 @@ class Editor < CyberarmEngine::GuiState
|
|||||||
@page.setup
|
@page.setup
|
||||||
@page.focus
|
@page.focus
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def page_requires_configuration?(klass)
|
||||||
|
[
|
||||||
|
TAC::Pages::Editor,
|
||||||
|
TAC::Pages::Presets,
|
||||||
|
TAC::Pages::Search
|
||||||
|
].include?(klass)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
begin
|
begin
|
||||||
|
raise LoadError if defined?(Ocra)
|
||||||
require_relative "../cyberarm_engine/lib/cyberarm_engine"
|
require_relative "../cyberarm_engine/lib/cyberarm_engine"
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
require "cyberarm_engine"
|
require "cyberarm_engine"
|
||||||
|
|||||||
Reference in New Issue
Block a user