From ad9cd2cd4c13d7169480dd9ff2039da01a405c7d Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Mon, 9 Feb 2026 13:06:05 +0000 Subject: [PATCH] fix(loadout): remove leftover code causing indentation error - Removed old attachment selection dialog code - Fixed _on_attach() method --- ui/loadout_manager.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/ui/loadout_manager.py b/ui/loadout_manager.py index 57a9b96..82682e1 100644 --- a/ui/loadout_manager.py +++ b/ui/loadout_manager.py @@ -1649,40 +1649,6 @@ class LoadoutManagerDialog(QDialog): def _on_attach(self, attachment_type: str): """Handle attachment selection (legacy - now uses API).""" self._on_select_attachment(attachment_type) - return - - # Create simple selection dialog - dialog = QDialog(self) - dialog.setWindowTitle(f"Select {attachment_type.title()}") - dialog.setMinimumWidth(400) - - layout = QVBoxLayout(dialog) - - list_widget = QListWidget() - for att in attachments: - item = QListWidgetItem(f"📎 {att.name}") - item.setData(Qt.ItemDataRole.UserRole, att) - list_widget.addItem(item) - - layout.addWidget(list_widget) - - buttons = QDialogButtonBox( - QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Cancel - ) - buttons.accepted.connect(dialog.accept) - buttons.rejected.connect(dialog.reject) - layout.addWidget(buttons) - - # Add None option - none_btn = QPushButton("Remove Attachment") - none_btn.clicked.connect(lambda: self._clear_attachment(attachment_type) or dialog.reject()) - layout.addWidget(none_btn) - - if dialog.exec() == QDialog.DialogCode.Accepted: - selected = list_widget.currentItem() - if selected: - att = selected.data(Qt.ItemDataRole.UserRole) - self._apply_attachment(attachment_type, att) def _apply_attachment(self, attachment_type: str, att): """Apply selected attachment."""