mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Disabled window position/size save/restore in tool mode
This commit is contained in:
parent
8650a5ae40
commit
2e06e9db9a
@ -59,7 +59,9 @@ var is_mac = false
|
||||
func _ready() -> void:
|
||||
# Restore the window position/size if values are present in the configuration cache
|
||||
config_cache.load("user://cache.ini")
|
||||
|
||||
if Engine.editor_hint:
|
||||
set_process_input(false)
|
||||
else:
|
||||
if config_cache.has_section_key("window", "screen"):
|
||||
OS.current_screen = config_cache.get_value("window", "screen")
|
||||
if config_cache.has_section_key("window", "maximized"):
|
||||
@ -515,6 +517,7 @@ func _on_Preview_show_background_preview(v) -> void:
|
||||
|
||||
func _exit_tree() -> void:
|
||||
# Save the window position and size to remember it when restarting the application
|
||||
if !Engine.editor_hint:
|
||||
config_cache.set_value("window", "screen", OS.current_screen)
|
||||
config_cache.set_value("window", "maximized", OS.window_maximized || OS.window_fullscreen)
|
||||
config_cache.set_value("window", "position", OS.window_position)
|
||||
|
Loading…
Reference in New Issue
Block a user