diff --git a/src/canvas.cpp b/src/canvas.cpp --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -562,6 +562,8 @@ Main::Main(QGraphicsScene& c, Mesh &m, Q Q3PopupMenu* edit = new Q3PopupMenu( menu ); edit->insertItem("Reset Chemicals and Transporters", this, SLOT( CleanMesh()), Qt::CTRL+Qt::Key_R ); + edit->insertItem("Reset Chemicals", this, SLOT( CleanMeshChemicals()) ); + edit->insertItem("Reset Transporters", this, SLOT( CleanMeshTransporters()) ); edit->insertItem("Randomize PIN1 Transporters", this, SLOT( RandomizeMesh()) ); edit->insertItem("Cut away SAM", this, SLOT( CutSAM() )); menu->insertItem("&Edit", edit); @@ -1437,16 +1439,58 @@ void Main::FitLeafToCanvas(void) { } void Main::CleanMesh(void) { - - mesh.SettoInitVals(); + vector clean_chem(Cell::NChem()); + vector clean_transporters(Cell::NChem()); + + for (int i=0;iFullRedraw(); - + Plot(); + + editor->FullRedraw(); + // repaint(); } +void Main::CleanMeshChemicals(void) { + + vector clean_chem(Cell::NChem()); + + for (int i=0;iFullRedraw(); + + // repaint(); +} + +void Main::CleanMeshTransporters(void) { + vector clean_transporters(Cell::NChem()); + for (int i=0;iFullRedraw(); + + // repaint(); +} + void Main::RandomizeMesh(void) { vector max_chem(Cell::NChem());