From e9c381fbc94f89925381db9d9e39b0df90a2e4f8 Mon Sep 17 00:00:00 2001 From: jmkerloch Date: Tue, 1 Oct 2024 18:34:28 +0200 Subject: [PATCH] feat(qdt export): fix rebase of main --- profile_manager/gui/interface_handler.py | 2 +- profile_manager/gui/mdl_profiles.py | 2 +- profile_manager/profile_manager_dialog.py | 8 ++++++-- .../qdt_export}/profile_export.py | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) rename {qdt_export => profile_manager/qdt_export}/profile_export.py (98%) diff --git a/profile_manager/gui/interface_handler.py b/profile_manager/gui/interface_handler.py index 1b03f29..9ca2ade 100644 --- a/profile_manager/gui/interface_handler.py +++ b/profile_manager/gui/interface_handler.py @@ -122,7 +122,7 @@ def setup_connections(self): self.dlg.comboBoxNamesTarget.currentIndexChanged.connect( self.conditionally_enable_import_button ) - self.dlg.list_profiles.currentItemChanged.connect( + self.dlg.list_profiles.selectionModel().selectionChanged.connect( self.conditionally_enable_profile_buttons ) diff --git a/profile_manager/gui/mdl_profiles.py b/profile_manager/gui/mdl_profiles.py index a7c6eff..fd09fda 100644 --- a/profile_manager/gui/mdl_profiles.py +++ b/profile_manager/gui/mdl_profiles.py @@ -3,7 +3,7 @@ from qgis.PyQt.QtGui import QStandardItemModel from qgis.core import QgsUserProfileManager, QgsUserProfile, QgsApplication -from ..profiles.utils import qgis_profiles_path +from profile_manager.profiles.utils import qgis_profiles_path class ProfileListModel(QStandardItemModel): diff --git a/profile_manager/profile_manager_dialog.py b/profile_manager/profile_manager_dialog.py index 145bf35..317ca1d 100644 --- a/profile_manager/profile_manager_dialog.py +++ b/profile_manager/profile_manager_dialog.py @@ -21,14 +21,18 @@ ***************************************************************************/ """ +# standard import os from pathlib import Path from typing import Optional +# pyQGIS from qgis.PyQt import QtWidgets, uic from qgis.PyQt.QtWidgets import QMessageBox -from .userInterface.mdl_profiles import ProfileListModel -from .qdt_export.profile_export import export_profile_for_qdt, get_qdt_profile_infos_from_file, QDTProfileInfos + +# plugin +from profile_manager.gui.mdl_profiles import ProfileListModel +from profile_manager.qdt_export.profile_export import export_profile_for_qdt, get_qdt_profile_infos_from_file, QDTProfileInfos # This loads your .ui file so that PyQt can populate your plugin with the elements from Qt Designer FORM_CLASS, _ = uic.loadUiType( diff --git a/qdt_export/profile_export.py b/profile_manager/qdt_export/profile_export.py similarity index 98% rename from qdt_export/profile_export.py rename to profile_manager/qdt_export/profile_export.py index 691383e..74c1f02 100644 --- a/qdt_export/profile_export.py +++ b/profile_manager/qdt_export/profile_export.py @@ -8,7 +8,7 @@ import pyplugin_installer -from ..profiles.utils import ( +from profile_manager.profiles.utils import ( qgis_profiles_path, get_profile_plugin_list_information, )