Skip to content

Commit

Permalink
- New tools.
Browse files Browse the repository at this point in the history
- Few updates in OMNotebook, OMEdit and OMPlot.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8666 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Apr 15, 2011
1 parent 395dcdc commit 191de02
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions OMNotebook/OMNotebookGUI/cellcommands.cpp
Expand Up @@ -40,6 +40,7 @@
// QT Headers
#include <QtGui/QTextCursor>
#include <QtGui/QTextDocumentFragment>
#include <QDebug>

//STD Headers
#include <exception>
Expand All @@ -48,6 +49,7 @@

//IAEX Headers
#include "cellcommands.h"
#include "graphcell.h"
#include "inputcell.h"
#include "textcell.h"
#include "cellgroup.h"
Expand Down Expand Up @@ -348,6 +350,7 @@ namespace IAEX
// create the new cell, if there exists a groupcell add the new cell to
// that groupcell.
Cell* newCell = factory->createCell( style.name() );

// if( groupcell )
// groupcell->addChild( newCell );

Expand Down Expand Up @@ -407,6 +410,28 @@ namespace IAEX

newInputCell->setClosed( oldInputCell->isClosed() );
}
else if( typeid(GraphCell) == typeid( *newCell ))
{
GraphCell *newGraphCell = dynamic_cast<GraphCell *>( newCell );
GraphCell *oldGraphCell = dynamic_cast<GraphCell *>( cell );

newGraphCell->setStyle( style );
newGraphCell->setText( oldGraphCell->text() );

if( oldGraphCell->isEvaluated() )
{
newGraphCell->setEvaluated( true );

if( oldGraphCell->isJavaPlot() )
newGraphCell->setTextOutputHtml( oldGraphCell->textOutputHtml() );
else
newGraphCell->setTextOutput( oldGraphCell->textOutput() );
}
else
newGraphCell->setEvaluated( false );

newGraphCell->setClosed( oldGraphCell->isClosed() );
}
else if( typeid(TextCell) == typeid( *newCell ))
{
newCell->setStyle( style );
Expand Down

0 comments on commit 191de02

Please sign in to comment.