Skip to content

Commit abcaeae

Browse files
committed
fix: Don't move window on click-to-provenance if already open
When clicking on a provenance link, if the target window is already open, just focus and navigate to the field without repositioning the window. Only position windows near the cursor when they are newly created.
1 parent bc76d9d commit abcaeae

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

src/pyqt_reactive/widgets/shared/clickable_help_components.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -552,23 +552,11 @@ def _navigate_to_source(self, source_scope_id: str, source_type: type) -> None:
552552
from pyqt_reactive.services import WindowFactory
553553

554554
if WindowManager.is_open(source_scope_id):
555+
# Window is already open - just focus and navigate, don't move it
555556
WindowManager.focus_and_navigate(
556557
scope_id=source_scope_id,
557558
field_path=target_path,
558559
)
559-
try:
560-
existing = WindowManager._scoped_windows.get(source_scope_id)
561-
source_window = self.window()
562-
if existing and source_window:
563-
if existing.frameGeometry().intersects(
564-
source_window.frameGeometry()
565-
):
566-
WindowManager.position_window_near_cursor(
567-
existing,
568-
avoid_widgets=[source_window],
569-
)
570-
except Exception:
571-
pass
572560
logger.info(f"✅ Navigated to source: scope={source_scope_id}, path={target_path}")
573561
return
574562

0 commit comments

Comments
 (0)