Changeset 8c5e2a for src/UIElements
- Timestamp:
- Apr 11, 2018, 6:29:56 AM (7 years ago)
- Branches:
- Candidate_v1.6.1, ChemicalSpaceEvaluator, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, TremoloParser_IncreasedPrecision
- Children:
- 2c97ad
- Parents:
- 8ac6d0e
- git-author:
- Frederik Heber <frederik.heber@…> (08/09/17 10:21:27)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/11/18 06:29:56)
- Location:
- src/UIElements/Views/Qt4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/QtTimeLine.cpp
r8ac6d0e r8c5e2a 50 50 Observer("QtTimeLine"), 51 51 atomobserver_enlisted(false), 52 worldtime_enlisted(false), 53 WorldTime_change(false) 52 worldtime_enlisted(false) 54 53 { 55 54 // set initial values 56 55 QSlider::setMinimum(0); 57 56 QSlider::setMaximum(0); 58 WorldTime_change = true;59 57 QSlider::setValue(0); 60 58 QSlider::setTickInterval(1); … … 69 67 70 68 // connect to QSlider's valueChanged() signal 71 bool result = connect(this,SIGNAL(valueChanged(int)),this,SLOT(StepUpdate(int)) , Qt::DirectConnection);69 bool result = connect(this,SIGNAL(valueChanged(int)),this,SLOT(StepUpdate(int))); 72 70 if (!result) 73 71 ELOG(0, "Could not connect to QSlider::valueChanged."); … … 116 114 QSlider::setMaximum(timestep); 117 115 // set slider position to new time step 118 WorldTime_change = true;119 116 QSlider::setValue( timestep ); 120 117 } else … … 133 130 boost::recursive_mutex::scoped_lock lock(refill_mutex); 134 131 135 if (WorldTime_change) 136 WorldTime_change = false; 137 else 132 if (WorldTime::getTime() != (unsigned int)position) 138 133 MoleCuilder::WorldSetWorldTime(position); 139 134 } -
src/UIElements/Views/Qt4/QtTimeLine.hpp
r8ac6d0e r8c5e2a 42 42 //!> whether WorldTime knows about us or not 43 43 bool worldtime_enlisted; 44 //!> states whether value was set by observing WorldTime (and not by slider)45 bool WorldTime_change;46 44 47 45 mutable boost::recursive_mutex refill_mutex;
Note:
See TracChangeset
for help on using the changeset viewer.