Changeset 6c4b69 for src/UIElements
- Timestamp:
- Apr 25, 2016, 7:02:56 AM (9 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 522c45
- Parents:
- 08a7ecc
- git-author:
- Frederik Heber <heber@…> (04/13/16 14:10:40)
- git-committer:
- Frederik Heber <heber@…> (04/25/16 07:02:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
r08a7ecc r6c4b69 410 410 "GLWorldScene::insertMolecule - could not create molecule object for " 411 411 +toString(molid)); 412 #ifndef NDEBUG 413 foreach (QObject *obj, molObject->children()) { 414 GLMoleculeObject *meshobj = qobject_cast<GLMoleculeObject *>(obj); 415 ASSERT( meshobj == NULL, 416 "GLWorldScene::insertMolecule() - there are already atoms or bonds attached to a to molecule."); 417 } 418 #endif 412 419 413 420 // check all atoms for not yet assigned parents … … 465 472 "GLWorldScene::removeMolecule() - to be removed molecule "+toString(_molid) 466 473 +" is already gone."); 467 // check if it's already empty468 474 GLMoleculeObject_molecule *molObject = iter->second; 475 // check for any atoms and bonds still attached to it 476 #ifndef NDEBUG 477 foreach (QObject *obj, molObject->children()) { 478 GLMoleculeObject *meshobj = qobject_cast<GLMoleculeObject *>(obj); 479 ASSERT( meshobj == NULL, 480 "GLWorldScene::removeMolecule() - there are still atoms or bonds attached to a to molecule."); 481 } 482 #endif 483 // finally, remove molecule 469 484 delete molObject; 470 485 MoleculesinSceneMap.erase(iter); … … 514 529 boost::recursive_mutex::scoped_lock lock(AtomNodeParentMap_mutex); 515 530 const ObservedValue_Index_t walkerid = walker->getIndex(); 531 LOG(4, "DEBUG: GLWorldScene: Received signal moleculeChanged for atom "+toString(walkerid)+"."); 516 532 AtomNodeParentMap_t::left_iterator parentiter = AtomNodeParentMap.left.find(walkerid); 517 533 ASSERT( parentiter != AtomNodeParentMap.left.end(), … … 582 598 const size_t dim = (_side == GLMoleculeObject_bond::left) ? 0 : 1; 583 599 const ObservedValue_Index_t bondid = _bond->getIndex(); 600 LOG(4, "DEBUG: GLWorldScene: Received signal moleculeChanged for bond "+toString(bondid)+"."); 584 601 BondNodeParentMap_t::left_iterator parentiter = BondNodeParentMaps[dim].left.find(bondid); 585 602 ASSERT( parentiter != BondNodeParentMaps[dim].left.end(), … … 612 629 parent = _molobj; 613 630 // else: molecule does not yet exist: is done when molecule is instantiated 631 LOG(5, "DEBUG: Resetting parent of " << _obj << " to " << parent); 614 632 _obj->setParent(parent); 615 } 633 ASSERT( _obj->parent() == parent, 634 "GLWorldScene::resetParent() - new parent "+toString(parent)+" was not set."); 635 } else 636 ELOG(1, "Object to reparent was NULL."); 616 637 // else object does not yet exist 617 638 }
Note:
See TracChangeset
for help on using the changeset viewer.