Skip to content

Commit

Permalink
Minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Moult committed Feb 4, 2023
1 parent c4b77c2 commit 6bab10d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/blenderbim/blenderbim/bim/module/profile/ui.py
Expand Up @@ -16,15 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.

from bpy.types import Panel, UIList
import bpy

import blenderbim.bim.helper
import blenderbim.tool as tool
from bpy.types import Panel, UIList
from blenderbim.bim.module.profile.data import ProfileData
from blenderbim.bim.module.profile.prop import generate_thumbnail_for_active_profile

# Profile Manager Class

class BIM_PT_profiles(Panel):
bl_label = "IFC Profiles"
bl_idname = "BIM_PT_profiles"
Expand All @@ -43,11 +42,10 @@ def draw(self, context):
ProfileData.load()
self.props = context.scene.BIMProfileProperties

if self.props.is_editing:
if self.props.is_editing and self.props.profiles and self.props.active_profile_index < len(self.props.profiles):
preview_collection = ProfileData.preview_collection
box = self.layout.box()
profile_id = self.props.profiles[self.props.active_profile_index].ifc_definition_id

profile_id_str = str(profile_id)
if profile_id_str in preview_collection:
preview_image = preview_collection[profile_id_str]
Expand Down

0 comments on commit 6bab10d

Please sign in to comment.