From 6ef74835af524310672c7b9fc36282010bb0e8ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Umut=20Utku=20ER=C5=9EAH=C4=B0NCE?=
 <ersahinceumut@gmail.com>
Date: Fri, 9 Aug 2024 11:00:20 +0300
Subject: [PATCH] fix #741

---
 app/js/app-menu.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/js/app-menu.js b/app/js/app-menu.js
index 86fdfb17..2c3244a7 100644
--- a/app/js/app-menu.js
+++ b/app/js/app-menu.js
@@ -176,6 +176,7 @@ module.exports = function() {
   promptInvalidURLWarning = appUtilities.promptInvalidURLWarning = new BackboneViews.PromptInvalidURLWarning({el: '#prompt-invalidURL-table'});
   promptInvalidImageWarning = appUtilities.promptInvalidImageWarning = new BackboneViews.PromptInvalidImageWarning({el: '#prompt-invalidImage-table'});
   promptInvalidEdgeWarning = appUtilities.promptInvalidEdgeWarning = new BackboneViews.PromptInvalidEdgeWarning({el: '#prompt-invalidEdge-table'});
+  exportErrorView = appUtilities.promptInvalidEdgeWarning = new BackboneViews.ExportErrorView({el: "#exportError-table",});
   toolbarButtonsAndMenu();
   keyboardShortcuts();
   // Events triggered by sbgnviz module
@@ -1734,11 +1735,12 @@ module.exports = function() {
 
       var mapType = chiseInstance.getMapType();
 
-      if(mapType == 'SIF' || mapType == 'AF'){
-        return;
+      if(mapType != 'PD' && mapType != 'HybridSbgn' && mapType != 'HybridAny' ){
+        exportErrorView.render();          
+        document.getElementById("export-error-message").innerText = "SBGN Bricks can only be used with PD maps!";
       }
-
-      reactionTemplateView.render();
+      else
+        reactionTemplateView.render();
     });
 
     $("#clone-selected").click(function (e) {