]> Creatis software - bbtkGEditor.git/commitdiff
2427 bbGEditor Support New Normal Correction of showing messages of support in the...
authorctorres <carlos.torres@creatis.insa-lyon.fr>
Mon, 7 Jul 2014 13:25:22 +0000 (15:25 +0200)
committerctorres <carlos.torres@creatis.insa-lyon.fr>
Mon, 7 Jul 2014 13:25:22 +0000 (15:25 +0200)
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx

index 282a48bede834d97ca4998bc323bd270dcc6c9d4..13dacc0797f2304002675f9dbeef70f36e5cea4e 100755 (executable)
@@ -151,6 +151,7 @@ widget       0      Widgets related messages
 wx   
 */
                _diagramMessageKind = new wxComboBox(panel, -1, wxEmptyString, wxDefaultPosition, wxSize(100,-1) );
+               _diagramMessageKind->Append (wxT(" "));
                _diagramMessageKind->Append (wxT("Interpreter"));
                _diagramMessageKind->Append (wxT("all"));
                _diagramMessageKind->Append (wxT("change"));
@@ -161,6 +162,7 @@ wx
                _diagramMessageKind->Append (wxT("debug"));
                _diagramMessageKind->Append (wxT("echo"));
                _diagramMessageKind->Append (wxT("error"));
+               _diagramMessageKind->Append (wxT("gui"));
                _diagramMessageKind->Append (wxT("help"));
                _diagramMessageKind->Append (wxT("kernel"));
                _diagramMessageKind->Append (wxT("max"));
@@ -175,6 +177,7 @@ wx
                _diagramMessageKind->SetEditable(false);
 
                _diagramMessageLevel = new wxComboBox(panel, -1, wxEmptyString, wxDefaultPosition, wxSize(100,-1) );
+               _diagramMessageLevel->Append (wxT(" "));                
                _diagramMessageLevel->Append (wxT("0"));
                _diagramMessageLevel->Append (wxT("1"));
                _diagramMessageLevel->Append (wxT("2"));
@@ -203,8 +206,33 @@ wx
 
                int currentType = (_parent->isCurrentDiagramComplexBox()==false)? 0 : 1;
                _diagramType->Select(currentType);
-               _diagramMessageKind->Select(currentType);
-               _diagramMessageLevel->Select(currentType);
+               std::string currentKindStr = _parent->getCurrentDiagramMessageKind();
+               int currentKind;
+                       if (currentKindStr =="Interpreter") { currentKind = 1;}
+                       if (currentKindStr == "all") { currentKind = 2; }
+                       if (currentKindStr == "change") { currentKind = 3;  }
+                       if (currentKindStr == "code") { currentKind = 4;  }
+                       if (currentKindStr == "config"){ currentKind = 5;  }
+                       if (currentKindStr == "connection") { currentKind = 6;  }
+                       if (currentKindStr == "data") { currentKind = 7;  }
+                       if (currentKindStr == "debug") { currentKind = 8;  }
+                       if (currentKindStr == "echo") { currentKind = 9;  }
+                       if (currentKindStr == "error") { currentKind = 10;  }
+                       if (currentKindStr == "gui") { currentKind = 11;  }
+                       if (currentKindStr == "help") { currentKind = 12;  }
+                       if (currentKindStr == "kernel") { currentKind = 13;  }
+                       if (currentKindStr == "max"){ currentKind = 14;  }
+                       if (currentKindStr == "object") { currentKind = 15;  }
+                       if (currentKindStr == "output") { currentKind = 16;  }
+                       if (currentKindStr == "package") { currentKind = 17;  }
+                       if (currentKindStr == "process") { currentKind = 18;  }
+                       if (currentKindStr == "qt" ){ currentKind = 19;  }
+                       if (currentKindStr == "warning") { currentKind = 20;  }
+                       if (currentKindStr == "widget") { currentKind = 21;  }
+                       if (currentKindStr == "wx" ){ currentKind = 22;  }
+               _diagramMessageKind->Select(currentKind);
+               int currentLevel = atoi(_parent->getCurrentDiagramMessageLevel().c_str());
+               _diagramMessageLevel->Select(currentLevel+1);
 
                wxStaticText *type = new wxStaticText(panel, -1, wxT("Type"));
                wxStaticText *author = new wxStaticText(panel, -1, wxT("Author"));
index a4214980e5c2d6c1cd31917fe8115fff0cfc9817..f29a4e8f3cd33b1a4ec76cd6f8058ca05634b88d 100644 (file)
@@ -1528,12 +1528,14 @@ std::string wxVtkSceneManager::getDiagramBBS(bool wln) {
                script += "# Complex input ports\n";
                script += complexInputs;
 
-               script += LineNumber(wln, lnNmbr);
-               script += "message ";
-               script += _MessageKind;
-               script += " ";
-               script += _MessageLevel;
-               script += "\n";
+               if((_MessageKind!=" ")&&(_MessageLevel!=" ")){
+                       script += LineNumber(wln, lnNmbr);
+                       script += "message ";
+                       script += _MessageKind;
+                       script += " ";
+                       script += _MessageLevel;
+                       script += "\n";
+               }
 
                for (i = 0; i < (int) execBoxes.size(); i++) {
                        script += LineNumber(wln, lnNmbr);