Correct a bug in the UpdateSession::close() mechanism.
* Bug: In Hurricane, UpdateSession::close(), when re-materializing, the cells must be notified <CellChanged> *after* all the Gos are re-materializeds. In fact they must also revalided according to the deepness of their instanciation (the deepest first). Has still to be done.
This commit is contained in:
parent
70b896fc96
commit
1e1495e294
|
@ -89,17 +89,25 @@ void UpdateSession::_destroy()
|
|||
|
||||
UPDATOR_STACK->pop();
|
||||
|
||||
vector<Cell*> changedCells;
|
||||
forEach( DBo*, iowner, getOwners() ) {
|
||||
Cell* cell = dynamic_cast<Cell*>(*iowner);
|
||||
if (cell) {
|
||||
//cerr << "Notify Cell::CellChanged to: " << cell << endl;
|
||||
cell->notify( Cell::CellChanged );
|
||||
changedCells.push_back( cell );
|
||||
} else {
|
||||
Go* go = dynamic_cast<Go*>(*iowner);
|
||||
if (go) go->materialize();
|
||||
}
|
||||
}
|
||||
|
||||
// Changed cells must be notified *after* all the Gos are materialized.
|
||||
// They also should be sorted according to their hierarchical depth and
|
||||
// revalidated bottom-up (TODO).
|
||||
for ( auto icell : changedCells ) {
|
||||
icell->notify( Cell::CellChanged );
|
||||
}
|
||||
|
||||
Inherit::_preDestroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ namespace Mauka {
|
|||
|
||||
_viewer->clearToolInterrupt();
|
||||
_viewer->getCellWidget()->fitToContents();
|
||||
_viewer->redrawCellWidget();
|
||||
}
|
||||
|
||||
|
||||
|
@ -198,10 +199,11 @@ namespace Mauka {
|
|||
_viewer->getCellWidget()->fitToContents ();
|
||||
|
||||
mauka->Run ();
|
||||
_viewer->redrawCellWidget();
|
||||
}
|
||||
|
||||
|
||||
void GraphicMaukaEngine::place ()
|
||||
void GraphicMaukaEngine::_place ()
|
||||
{
|
||||
if (MetisEngine::isHMetisCapable()) {
|
||||
doQuadriPart();
|
||||
|
@ -211,7 +213,7 @@ namespace Mauka {
|
|||
}
|
||||
|
||||
doSimulatedAnnealing();
|
||||
save();
|
||||
_save();
|
||||
}
|
||||
|
||||
|
||||
|
@ -220,6 +222,7 @@ namespace Mauka {
|
|||
MaukaEngine* mauka = getForFramework( NoFlags );
|
||||
|
||||
_viewer->clearToolInterrupt ();
|
||||
_viewer->redrawCellWidget();
|
||||
mauka->Save ();
|
||||
}
|
||||
|
||||
|
@ -232,6 +235,10 @@ namespace Mauka {
|
|||
{ ExceptionWidget::catchAllWrapper( std::bind(&GraphicMaukaEngine::_doSimulatedAnnealing,this) ); }
|
||||
|
||||
|
||||
void GraphicMaukaEngine::place ()
|
||||
{ ExceptionWidget::catchAllWrapper( std::bind(&GraphicMaukaEngine::_place,this) ); }
|
||||
|
||||
|
||||
void GraphicMaukaEngine::save ()
|
||||
{ ExceptionWidget::catchAllWrapper( std::bind(&GraphicMaukaEngine::_save,this) ); }
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ namespace Mauka {
|
|||
virtual ~GraphicMaukaEngine ();
|
||||
void _doQuadriPart ();
|
||||
void _doSimulatedAnnealing ();
|
||||
void _place ();
|
||||
void _save ();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue