Skip to content

Commit

Permalink
fix Ticket:4704
Browse files Browse the repository at this point in the history
accept click on input cell after clicking output cell
allow to open empty notebooks
apply style to output cells
  • Loading branch information
hkiel committed Jan 18, 2018
1 parent 5650618 commit 4a5e0fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions OMNotebook/OMNotebookGUI/celldocument.cpp
Expand Up @@ -945,13 +945,7 @@ namespace IAEX
*/
void CellDocument::mouseClickedOnCell(Cell *clickedCell)
{

// 2006-04-25, AF
if( lastClickedCell_ == clickedCell )
return;
else
lastClickedCell_ = clickedCell;

lastClickedCell_ = clickedCell;

//Deselect all selection
clearSelection();
Expand Down
4 changes: 1 addition & 3 deletions OMNotebook/OMNotebookGUI/graphcell.cpp
Expand Up @@ -856,12 +856,9 @@ namespace IAEX {
layout_->addWidget( output_, 2, 1 );

output_->setReadOnly( true );

output_->setOpenLinks(false);

output_->setFrameShape( QFrame::Box );
output_->setAutoFormatting( QTextEdit::AutoNone );

output_->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
output_->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );

Expand Down Expand Up @@ -908,6 +905,7 @@ namespace IAEX {
output_->setAlignment( (Qt::AlignmentFlag)style.alignment() );
output_->mergeCurrentCharFormat( (*style.textCharFormat()) );
output_->document()->rootFrame()->setFrameFormat( (*style.textFrameFormat()) );
output_->setFont(style.textCharFormat()->font());
}
else
{
Expand Down
2 changes: 2 additions & 0 deletions OMNotebook/OMNotebookGUI/xmlparser.cpp
Expand Up @@ -253,12 +253,14 @@ namespace IAEX
throw e;
}

/* Do not throw an error if empty notebook is opened
// check if root cell is empty
if( !rootcell->hasChilds() )
{
string msg = "File " + filename_.toStdString() + " is empty";
throw runtime_error( msg.c_str() );
}
*/

return rootcell;
}
Expand Down

0 comments on commit 4a5e0fc

Please sign in to comment.