Skip to content

Commit

Permalink
- fixes for some OMNotebook crashes
Browse files Browse the repository at this point in the history
- updates of some .onb files

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@3802 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Jan 16, 2009
1 parent 2ff18dc commit 9427ba2
Show file tree
Hide file tree
Showing 12 changed files with 430 additions and 423 deletions.
2 changes: 1 addition & 1 deletion OMNotebook/3Dpkg/VisualizationWidget.cpp
Expand Up @@ -42,7 +42,7 @@ namespace IAEX {
connect(timer_, SIGNAL(timeout()),
this, SLOT(nextFrame()));

buttonlayout_ = new QVBoxLayout(this);
buttonlayout_ = new QVBoxLayout();
buttonlayout_->addWidget(playbutton);
buttonlayout_->addWidget(stopbutton);
buttonlayout_->addWidget(rewbutton);
Expand Down
2 changes: 1 addition & 1 deletion OMNotebook/OMNotebookQT4/generatedfiles/qrc_res_qt.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
** Resource object code
**
** Created: Sat 10. Jan 19:22:32 2009
** Created: Fri 16. Jan 19:58:40 2009
** by: The Resource Compiler for Qt version 4.4.2
**
** WARNING! All changes made in this file will be lost!
Expand Down
25 changes: 14 additions & 11 deletions OMNotebook/OMNotebookQT4/graphcell.cpp
Expand Up @@ -482,7 +482,7 @@ namespace IAEX
// if(prevLevel >= 0 && 2*(i.level()) != prevLevel )
if(prevLevel > 2*i.level())
{
int j = t.position();
// int j = t.position();
/*
t.setPosition(t.block().position());
QMessageBox::information(0, "uu3", t.block().text());
Expand Down Expand Up @@ -1211,7 +1211,7 @@ namespace IAEX
// input_->document()->setHtml( input_->toHtml() ); //uu
// input_->document()->setPlainText(tmp);

bool b = input_->document()->isEmpty();
// bool b = input_->document()->isEmpty();
/*
input_->document()->setPlainText(text);
Expand Down Expand Up @@ -1638,7 +1638,7 @@ namespace IAEX
bool GraphCell::isPlot(QString text)
{
// QRegExp exp( "plot\\((.*)|plotParametric\\((.*)|simulate" );
QRegExp exp( "plot2\\((.*)|plotParametric2\\((.*)" );
QRegExp exp( "plot2[ ]*\\((.*)|plotParametric2[ ]*\\((.*)" );
if( text.isNull() )
{
if( 0 <= input_->toPlainText().indexOf( exp, 0 ) )
Expand Down Expand Up @@ -1673,7 +1673,7 @@ namespace IAEX

bool GraphCell::isPlot2(QString text)
{
QRegExp exp("plot\\(.*\\)|plotParametric\\(.*\\)|plotAll" );
QRegExp exp("plot[ ]*\\(.*\\)|plotParametric[ ]*\\(.*\\)|plotAll[ ]*\\(.*\\)" );

if( text.isNull() )
{
Expand All @@ -1699,7 +1699,7 @@ namespace IAEX

bool GraphCell::isVisualize(QString text)
{
QRegExp exp( "visualize\\((.*)" );
QRegExp exp( "visualize[ ]*\\((.*)" );


if( text.isNull() )
Expand Down Expand Up @@ -1957,11 +1957,14 @@ namespace IAEX
else
{
try
{
{
EvalThread* et = new EvalThread(delegate(), expr);
connect(et, SIGNAL(finished()), this, SLOT(delegateFinished()));
et->start();
// delegate()->evalExpression( expr );
if (!visualize && !newPlot) et->wait();
/*
delegate()->evalExpression(expr);
*/
}
catch( exception &e )
{
Expand Down Expand Up @@ -2093,7 +2096,7 @@ namespace IAEX
}
else //!hasDelegate
{
cout << "Not delegate on GraphCell" << endl;
// cout << "Not delegate on GraphCell" << endl;
// adrpo: do not set error as it might be a group cell
//setState(ERROR);
}
Expand Down Expand Up @@ -2367,7 +2370,7 @@ void GraphCell::delegateFinished()

QRegExp e("([\\d]+:[\\d]+-[\\d]+:[\\d]+)|([\\d]+:[\\d]+)");

bool b;
// bool b;
int p=0;


Expand Down Expand Up @@ -2532,8 +2535,8 @@ void GraphCell::exceptionInEval(exception &e)
}
catch( exception &e )
{
QMessageBox::critical( 0, tr("Communication Error"),
tr("<B>Unable to communication correctlly with OMC.</B>") );
e.what();
QMessageBox::critical( 0, tr("Communication Error"), tr("<B>Unable to communication correctlly with OMC.</B>") );
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions OMNotebook/OMNotebookQT4/notebook.cpp
Expand Up @@ -1642,6 +1642,7 @@ namespace IAEX
/*!
* \author Ingemar Axelsson
*/
/*
void NotebookWindow::createSavingTimer()
{
//start a saving timer.
Expand All @@ -1651,6 +1652,7 @@ namespace IAEX
connect(savingTimer_, SIGNAL(timeout()),
this, SLOT(save()));
}
*/



Expand Down
4 changes: 2 additions & 2 deletions OMNotebook/OMNotebookQT4/notebook.h
Expand Up @@ -191,7 +191,7 @@ namespace IAEX

bool cellEditable(); //Added 2005-11-11 AF
void evalCells(); //Added 2006-02-14 AF
void createSavingTimer();
//void createSavingTimer();

private:
QToolBar* toolBar;
Expand Down Expand Up @@ -358,7 +358,7 @@ namespace IAEX
//list<Document *> opendocs_;
QString filename_;

QTimer *savingTimer_;
// QTimer *savingTimer_;
map<QString, QAction*> styles_;

SearchForm* findForm_; // added 2006-08-24 AF
Expand Down

0 comments on commit 9427ba2

Please sign in to comment.