Cleanup: gitignore Rhino-Testdateien, Layout-Skip-Versuch zurueck (WebView-Bug)
This commit is contained in:
@@ -26,6 +26,12 @@ __pycache__/
|
||||
*.pyc
|
||||
*.pyo
|
||||
|
||||
# Rhino-Testdateien (rhino/-Ordner)
|
||||
rhino/*.3dm
|
||||
rhino/*.3dm.thumb.png
|
||||
rhino/*.3dmbak
|
||||
rhino/dossier.project.json
|
||||
|
||||
# Claude Code
|
||||
.claude/
|
||||
|
||||
|
||||
@@ -763,6 +763,32 @@ def _layout_name_to_guid(name):
|
||||
_LAYOUT_MARKER_PATH = os.path.expanduser(
|
||||
"~/Library/Application Support/ch.gabrielevarano.Dossier/layout_marker.json")
|
||||
|
||||
_RHINO_SETTINGS_XML = os.path.expanduser(
|
||||
"~/Library/Application Support/McNeel/Rhinoceros/8.0/settings/"
|
||||
"settings-Scheme__Default.xml")
|
||||
|
||||
|
||||
def _rhino_last_restored_layout_guid():
|
||||
"""Liest aus Rhinos settings-Scheme__Default.xml die zuletzt restorete
|
||||
Layout-GUID. Rhino schreibt diesen Eintrag nach jedem erfolgreichen
|
||||
Restore (sowohl beim App-Start als auch nach `_-WindowLayout`-Command).
|
||||
Wenn die GUID == unser Ziel ist, hat Rhino's Auto-Restore das Layout
|
||||
schon beim Cold-Start angewendet → wir koennen den teuren Command-
|
||||
Apply skippen."""
|
||||
try:
|
||||
if not os.path.isfile(_RHINO_SETTINGS_XML): return None
|
||||
with open(_RHINO_SETTINGS_XML, "rb") as f:
|
||||
txt = f.read().decode("utf-8", errors="replace")
|
||||
# <entry key="LastRestoredWindowLayout">b6b68c03-...</entry>
|
||||
import re
|
||||
m = re.search(
|
||||
r'<entry\s+key="LastRestoredWindowLayout">\s*([0-9a-fA-F\-]+)\s*</entry>',
|
||||
txt)
|
||||
if m: return m.group(1).strip().lower()
|
||||
except Exception as ex:
|
||||
print("[OBERLEISTE] last-restored read:", ex)
|
||||
return None
|
||||
|
||||
|
||||
def _is_layout_recently_applied(name, max_age_sec=600):
|
||||
"""True wenn das gegebene Layout vor < max_age_sec Sekunden via DOSSIER
|
||||
@@ -812,6 +838,11 @@ def _apply_window_layout(name):
|
||||
if not name:
|
||||
print("[OBERLEISTE] apply_window_layout: leerer Name")
|
||||
return False
|
||||
# KEIN Content-Skip mehr: Mac Rhino's Auto-Restore aus LastRestoredWindow
|
||||
# Layout dockt Eto-WebView-Panels NICHT korrekt — sie spawnen floating in
|
||||
# der Mitte statt an die persistierte Dock-Position. Nur der explizite
|
||||
# `_-WindowLayout`-RunScript triggert den vollen Re-Dock-Cycle der auch
|
||||
# WebViews korrekt platziert. Die 3s sind der Preis fuer korrektes UI.
|
||||
import time as _t_wl
|
||||
_t_wl_start = _t_wl.time()
|
||||
_ret = False
|
||||
|
||||
Reference in New Issue
Block a user