|
mycae |
91c0023 |
diff -r 50a287e4484b src/3Depict.cpp
|
|
mycae |
91c0023 |
--- src/3Depict.cpp Mon Mar 07 01:33:27 2011 +0000
|
|
mycae |
91c0023 |
+++ src/3Depict.cpp Sun Mar 13 00:53:01 2011 +0000
|
|
mycae |
91c0023 |
@@ -281,7 +281,7 @@
|
|
mycae |
91c0023 |
MainWindowFrame::MainWindowFrame(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style):
|
|
mycae |
91c0023 |
wxFrame(parent, id, title, pos, size, style)
|
|
mycae |
91c0023 |
{
|
|
mycae |
91c0023 |
-
|
|
mycae |
91c0023 |
+ initedOK=false;
|
|
mycae |
91c0023 |
programmaticEvent=false;
|
|
mycae |
91c0023 |
fullscreenState=0;
|
|
mycae |
91c0023 |
//Set up the program icon handler
|
|
mycae |
91c0023 |
@@ -324,6 +324,14 @@
|
|
mycae |
91c0023 |
splitterSpectra = new wxSplitterWindow(noteDataView, ID_SPLIT_SPECTRA, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_BORDER);
|
|
mycae |
91c0023 |
window_2_pane_2 = new wxPanel(splitterSpectra, wxID_ANY);
|
|
mycae |
91c0023 |
panelTop = new BasicGLPane(splitTopBottom);
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
+ //I had to work this out by studying the construtor
|
|
mycae |
91c0023 |
+ if(!panelTop->m_glContext)
|
|
mycae |
91c0023 |
+ {
|
|
mycae |
91c0023 |
+ cerr << "Unable to initialise the openGL panel. Program cannot start. Please check your video drivers." << endl;
|
|
mycae |
91c0023 |
+ return;
|
|
mycae |
91c0023 |
+ }
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
panelLeft = new wxPanel(splitLeftRight, wxID_ANY);
|
|
mycae |
91c0023 |
notebookControl = new wxNotebook(panelLeft, ID_NOTEBOOK_CONTROL, wxDefaultPosition, wxDefaultSize, wxNB_RIGHT);
|
|
mycae |
91c0023 |
noteTools = new wxPanel(notebookControl, ID_NOTE_PERFORMANCE, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
|
mycae |
91c0023 |
@@ -661,7 +669,7 @@
|
|
mycae |
91c0023 |
delete paths;
|
|
mycae |
91c0023 |
//-----------------
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
-
|
|
mycae |
91c0023 |
+ initedOK=true;
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
updateTimer->Start(UPDATE_TIMER_DELAY,wxTIMER_CONTINUOUS);
|
|
mycae |
91c0023 |
@@ -4208,7 +4216,7 @@
|
|
mycae |
91c0023 |
{
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
//Register signal handler for backtraces
|
|
mycae |
91c0023 |
- if (!wxApp::OnInit())
|
|
mycae |
91c0023 |
+ if (!wxApp::OnInit())
|
|
mycae |
91c0023 |
return false;
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
//Need to seed random number generator for entire program
|
|
mycae |
91c0023 |
@@ -4220,6 +4228,10 @@
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
wxInitAllImageHandlers();
|
|
mycae |
91c0023 |
MainFrame = new MainWindowFrame(NULL, wxID_ANY, wxEmptyString);
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
+ if(!MainFrame->initOK())
|
|
mycae |
91c0023 |
+ return false;
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
SetTopWindow(MainFrame);
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
#ifdef DEBUG
|
|
mycae |
91c0023 |
diff -r 50a287e4484b src/3Depict.h
|
|
mycae |
91c0023 |
--- src/3Depict.h Mon Mar 07 01:33:27 2011 +0000
|
|
mycae |
91c0023 |
+++ src/3Depict.h Sun Mar 13 00:53:01 2011 +0000
|
|
mycae |
91c0023 |
@@ -108,6 +108,8 @@
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
//!Current fullscreen status
|
|
mycae |
91c0023 |
unsigned int fullscreenState;
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
+ bool initedOK;
|
|
mycae |
91c0023 |
protected:
|
|
mycae |
91c0023 |
wxTimer *statusTimer;
|
|
mycae |
91c0023 |
wxTimer *progressTimer;
|
|
mycae |
91c0023 |
@@ -301,6 +303,10 @@
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
virtual void SetCommandLineFiles(wxArrayString &files);
|
|
mycae |
91c0023 |
virtual void updateLastRefreshBox();
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
+ bool initOK() const {return initedOK;}
|
|
mycae |
91c0023 |
+
|
|
mycae |
91c0023 |
}; // wxGlade: end class
|
|
mycae |
91c0023 |
|
|
mycae |
91c0023 |
|