Commit 6a75635e authored by cornimueller's avatar cornimueller
Browse files

[MERGE]

parents da13d599 ab56b8d5
...@@ -11,4 +11,5 @@ ...@@ -11,4 +11,5 @@
# [ge] # Settings for the graphics engine # [ge] # Settings for the graphics engine
# bgColor.r = .9 # background color (red part) # bgColor.r = .9 # background color (red part)
# bgColor.g = .9 # background color (green part) # bgColor.g = .9 # background color (green part)
# bgColor.b = .9 # background color (blue part) # bgColor.b = .9 # background color (blue part)
\ No newline at end of file # zoomTrackballManipulator.allowThrow = yes # allow the auto-rotation thing wenn "throwing" an object with the mouse
...@@ -82,7 +82,6 @@ template< typename T > bool WPreferences::getPreference( std::string prefName, T ...@@ -82,7 +82,6 @@ template< typename T > bool WPreferences::getPreference( std::string prefName, T
boost::program_options::variables_map configuration; boost::program_options::variables_map configuration;
if( wiotools::fileExists( cfgFileName ) ) if( wiotools::fileExists( cfgFileName ) )
{ {
wlog::info( "GUI" ) << "Reading config file: " << cfgFileName;
std::ifstream ifs( cfgFileName.c_str(), std::ifstream::in ); std::ifstream ifs( cfgFileName.c_str(), std::ifstream::in );
try try
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "WGEZoomTrackballManipulator.h" #include "WGEZoomTrackballManipulator.h"
#include "../common/WPreferences.h"
WGEZoomTrackballManipulator::WGEZoomTrackballManipulator(): WGEZoomTrackballManipulator::WGEZoomTrackballManipulator():
TrackballManipulator() TrackballManipulator()
...@@ -108,7 +109,11 @@ bool WGEZoomTrackballManipulator::zoom( const osgGA::GUIEventAdapter& ea, osgGA: ...@@ -108,7 +109,11 @@ bool WGEZoomTrackballManipulator::zoom( const osgGA::GUIEventAdapter& ea, osgGA:
bool WGEZoomTrackballManipulator::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ) bool WGEZoomTrackballManipulator::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us )
{ {
_thrown = false; // We do not want the auto-rotation thingy. bool allowThrow;
if( !( WPreferences::getPreference( "ge.zoomTrackballManipulator.allowThrow", &allowThrow ) && allowThrow ) )
{
_thrown = false; // By default we do not want the auto-rotation thingy.
}
if( ea.getEventType() == osgGA::GUIEventAdapter::SCROLL || ea.getKey() == 45 || ea.getKey() == 43 ) if( ea.getEventType() == osgGA::GUIEventAdapter::SCROLL || ea.getKey() == 45 || ea.getKey() == 43 )
{ {
return zoom( ea, us ); return zoom( ea, us );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment