Changeset 6246 for geovis/trunk
- Timestamp:
- Apr 5, 2016 11:14:22 AM (8 years ago)
- Location:
- geovis/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/Renderer.cpp
r6245 r6246 495 495 void Renderer::initControls() 496 496 { 497 if (_ hbox.valid())498 return; 499 _ hbox =497 if (_copyrightScaleBox.valid()) 498 return; 499 _copyrightScaleBox = 500 500 new osgEarth::Util::Controls::HBox(osgEarth::Util::Controls::Control::ALIGN_RIGHT, 501 501 osgEarth::Util::Controls::Control::ALIGN_BOTTOM, … … 518 518 _scaleBar->setBorderColor(osg::Vec4f(0, 0, 0 ,1)); 519 519 _scaleBar->setBorderWidth(1.0); 520 _ hbox->addControl(_copyrightLabel.get());521 _ hbox->addControl(_scaleLabel.get());522 _ hbox->addControl(_scaleBar.get());523 osgEarth::Util::Controls::ControlCanvas::getOrCreate(_viewer.get())->addControl(_ hbox.get());520 _copyrightScaleBox->addControl(_copyrightLabel.get()); 521 _copyrightScaleBox->addControl(_scaleLabel.get()); 522 _copyrightScaleBox->addControl(_scaleBar.get()); 523 osgEarth::Util::Controls::ControlCanvas::getOrCreate(_viewer.get())->addControl(_copyrightScaleBox.get()); 524 524 // Install an event callback to handle scale bar updates 525 525 // Can't use an update callback since that will trigger -
geovis/trunk/Renderer.h
r6219 r6246 663 663 osg::ref_ptr<MouseCoordsTool> _mouseCoordsTool; 664 664 osg::ref_ptr<MouseCoordsCallback> _coordsCallback; 665 osg::ref_ptr<osgEarth::Util::Controls::HBox> _ hbox;665 osg::ref_ptr<osgEarth::Util::Controls::HBox> _copyrightScaleBox; 666 666 osg::ref_ptr<osgEarth::Util::Controls::LabelControl> _copyrightLabel; 667 667 osg::ref_ptr<osgEarth::Util::Controls::LabelControl> _scaleLabel;
Note: See TracChangeset
for help on using the changeset viewer.