]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMMainFrame.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMMainFrame.cpp
index 07ea08094331cedf025105631a6c5643ff2327ff..6f0af4608e0acb5e93b494ab0e1ad4d6d540c9b0 100755 (executable)
@@ -53,7 +53,6 @@
 #include "wxCDMProjectActionsPanel.h"
 #include "wxCDMNewProjectDialog.h"
 
-#include "wxCDMProjectHelpDialog.h"
 
 
 BEGIN_EVENT_TABLE(wxCDMMainFrame, wxFrame)
@@ -81,12 +80,17 @@ EVT_MENU(ID_MENU_HELP, wxCDMMainFrame::OnMenuHelp)
 EVT_MENU(ID_MENU_REPORT_BUG, wxCDMMainFrame::OnMenuReportBug)
 EVT_MENU(ID_MENU_ABOUT_CREADEVMANAGER, wxCDMMainFrame::OnMenuAboutCreaDevManager)
 EVT_MENU(ID_MENU_ABOUT_CREATIS, wxCDMMainFrame::OnMenuAboutCreatis)
+
 EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCDMMainFrame::OnMenuNewProject)
 EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMMainFrame::OnMenuOpenProject)
+
 EVT_TREE_SEL_CHANGED(ID_TREE_PROJECTS, wxCDMMainFrame::OnTreeSelectionChanged)
+
 EVT_COMMAND(wxID_ANY, wxEVT_DISPLAY_CHANGED, wxCDMMainFrame::OnCreationComplete)
 EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxCDMMainFrame::OnElementSelected)
 EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxCDMMainFrame::OnElementDeselected)
+
+
 EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMMainFrame::OnDisableHelp)
 END_EVENT_TABLE()
 
@@ -129,6 +133,16 @@ modelCDMMain* wxCDMMainFrame::GetModel() const
   return this->model;
 }
 
+wxPanel* wxCDMMainFrame::GetPropertiesPanel() const
+{
+  return this->panel_Properties;
+}
+
+bool wxCDMMainFrame::isHelp() const
+{
+  return this->help;
+}
+
 void wxCDMMainFrame::RefreshProject()
 {
   std::string* result;
@@ -629,7 +643,6 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
       //project
       modelCDMProject* elementProject = dynamic_cast<modelCDMProject*>(element);
       wxPanel* description;
-      wxDialog* helpDialog = NULL;
       if(elementProject != NULL)
         {
           //create element description
@@ -643,10 +656,6 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
               0
           );
 
-          if(this->help)
-            {
-              helpDialog = new wxCDMProjectHelpDialog(this, wxID_ANY);
-            }
         }
       else
         {
@@ -664,6 +673,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                   wxSize(600, 400),
                   0
               );
+
             }
           else
             {
@@ -841,10 +851,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
       //set new view
 
       this->panel_Properties = description;
-      if(this->help && helpDialog != NULL)
-        {
-          helpDialog->Show(true);
-        }
+
       //auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400).CloseButton(false));
       auiManager.Update();
       event.Skip();