mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 06:09:16 +00:00
Revert "Add Space key as alternative to Enter for PI Edit Mode apply"
This reverts commit 33a4639de5.
This commit is contained in:
@@ -392,7 +392,7 @@ class PIEditDecorator:
|
|||||||
f"PIs: {valid_count}",
|
f"PIs: {valid_count}",
|
||||||
"",
|
"",
|
||||||
"G: Move selected PI",
|
"G: Move selected PI",
|
||||||
"ENTER/SPACE: Apply changes",
|
"ENTER: Apply changes",
|
||||||
"ESC: Cancel",
|
"ESC: Cancel",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1450,7 +1450,7 @@ class SAIKEI_OT_enter_pi_edit_mode(Operator):
|
|||||||
|
|
||||||
# Start modal loop
|
# Start modal loop
|
||||||
context.window_manager.modal_handler_add(self)
|
context.window_manager.modal_handler_add(self)
|
||||||
self.report({"INFO"}, "PI Edit Mode: Move PIs with G. Press Enter/Space to apply, Escape to cancel.")
|
self.report({"INFO"}, "PI Edit Mode: Move PIs with G. Press Enter to apply, Escape to cancel.")
|
||||||
return {"RUNNING_MODAL"}
|
return {"RUNNING_MODAL"}
|
||||||
|
|
||||||
def modal(self, context, event):
|
def modal(self, context, event):
|
||||||
@@ -1474,12 +1474,8 @@ class SAIKEI_OT_enter_pi_edit_mode(Operator):
|
|||||||
if self._area:
|
if self._area:
|
||||||
self._area.tag_redraw()
|
self._area.tag_redraw()
|
||||||
|
|
||||||
# Handle keyboard input for apply/cancel
|
# Handle keyboard input
|
||||||
# Support both regular Enter and Numpad Enter, plus Space as alternative
|
if event.type == "RET" and event.value == "PRESS":
|
||||||
if event.type in {"RET", "NUMPAD_ENTER", "SPACE"} and event.value == "PRESS":
|
|
||||||
# Don't consume Space if user is typing in a field
|
|
||||||
if event.type == "SPACE" and context.area.type != "VIEW_3D":
|
|
||||||
return {"PASS_THROUGH"}
|
|
||||||
return self._cleanup_and_finish(context, apply=True)
|
return self._cleanup_and_finish(context, apply=True)
|
||||||
|
|
||||||
if event.type == "ESC" and event.value == "PRESS":
|
if event.type == "ESC" and event.value == "PRESS":
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ class SAIKEI_PT_pi_editor(Panel):
|
|||||||
box.label(text="PI Edit Mode Active", icon="EDITMODE_HLT")
|
box.label(text="PI Edit Mode Active", icon="EDITMODE_HLT")
|
||||||
col = box.column(align=True)
|
col = box.column(align=True)
|
||||||
col.label(text="Move PIs with G key")
|
col.label(text="Move PIs with G key")
|
||||||
col.label(text="Press Enter or Space to apply")
|
col.label(text="Press Enter to apply")
|
||||||
col.label(text="Press Escape to cancel")
|
col.label(text="Press Escape to cancel")
|
||||||
layout.separator()
|
layout.separator()
|
||||||
return # Don't show normal UI while in edit mode
|
return # Don't show normal UI while in edit mode
|
||||||
|
|||||||
Reference in New Issue
Block a user