Changeset ff1696
- Timestamp:
- Aug 9, 2017, 10:21:27 AM (8 years ago)
- Branches:
- ForceAnnealing_with_BondGraph_continued
- Children:
- 35364f0
- Parents:
- 78830b
- Location:
- src/UIElements/Views/Qt4
- Files:
-
- 2 edited
-
QtTimeLine.cpp (modified) (4 diffs)
-
QtTimeLine.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/QtTimeLine.cpp
r78830b rff1696 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
r78830b rff1696 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.
