From 4e9d0e454ac59e7e837de8e9ddec1219c69a6e55 Mon Sep 17 00:00:00 2001 From: duplo Date: Mon, 24 May 2010 13:30:14 +0000 Subject: [PATCH] No default image. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3807 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BBoardPage.py | 8 +++++--- wizard/BProjectPresets.py | 8 +++++--- wizard/ui/board_select.ui | 10 +++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/wizard/BBoardPage.py b/wizard/BBoardPage.py index 0877ea50..160ff610 100644 --- a/wizard/BBoardPage.py +++ b/wizard/BBoardPage.py @@ -111,10 +111,12 @@ class BBoardPage(BWizardPage): info_dict = qvariant_converter.getStringDict(info_dict["info"]) description = info_dict.get("description", "") image = os.path.join(info_dict["path"], ".image.png") - if not os.path.exists(image): - image = ":/images/default_board_image.png" + if os.path.exists(image): + self.pageContent.imageLabel.setPixmap(QPixmap(image)) + self.pageContent.imageLabel.setVisible(True) + else: + self.pageContent.imageLabel.setVisible(False) self.pageContent.descriptionLabel.setText(description) - self.pageContent.imageLabel.setPixmap(QPixmap(image)) #### diff --git a/wizard/BProjectPresets.py b/wizard/BProjectPresets.py index c0381a5c..18268e67 100644 --- a/wizard/BProjectPresets.py +++ b/wizard/BProjectPresets.py @@ -84,9 +84,11 @@ class BProjectPresetsPage(QWidget): preset = self.preset_data["children"][preset_path] self.pageContent.descriptionLabel.setText(preset["info"].get("description", "")) image = os.path.join(preset["info"]["path"], const.PREDEFINED_BOARD_IMAGE_FILE) - if not os.path.exists(image): - image = const.PREDEFINED_BOARD_DEFAULT_IMAGE - self.pageContent.imageLabel.setPixmap(QPixmap(image)) + if os.path.exists(image): + self.pageContent.imageLabel.setPixmap(QPixmap(image)) + self.pageContent.imageLabel.setVisible(True) + else: + self.pageContent.imageLabel.setVisible(False) @property def selected(self): diff --git a/wizard/ui/board_select.ui b/wizard/ui/board_select.ui index cca3695f..99949531 100644 --- a/wizard/ui/board_select.ui +++ b/wizard/ui/board_select.ui @@ -24,13 +24,10 @@ - + - - true - @@ -47,10 +44,13 @@ - + + + true + -- 2.25.1