Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
6a75635e
Commit
6a75635e
authored
Jan 11, 2010
by
cornimueller
Browse files
[MERGE]
parents
da13d599
ab56b8d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
doc/user/walnut.cfg
doc/user/walnut.cfg
+2
-1
src/common/WPreferences.h
src/common/WPreferences.h
+0
-1
src/graphicsEngine/WGEZoomTrackballManipulator.cpp
src/graphicsEngine/WGEZoomTrackballManipulator.cpp
+6
-1
No files found.
doc/user/walnut.cfg
View file @
6a75635e
...
...
@@ -11,4 +11,5 @@
# [ge] # Settings for the graphics engine
# bgColor.r = .9 # background color (red part)
# bgColor.g = .9 # background color (green part)
# bgColor.b = .9 # background color (blue part)
\ No newline at end of file
# bgColor.b = .9 # background color (blue part)
# zoomTrackballManipulator.allowThrow = yes # allow the auto-rotation thing wenn "throwing" an object with the mouse
src/common/WPreferences.h
View file @
6a75635e
...
...
@@ -82,7 +82,6 @@ template< typename T > bool WPreferences::getPreference( std::string prefName, T
boost
::
program_options
::
variables_map
configuration
;
if
(
wiotools
::
fileExists
(
cfgFileName
)
)
{
wlog
::
info
(
"GUI"
)
<<
"Reading config file: "
<<
cfgFileName
;
std
::
ifstream
ifs
(
cfgFileName
.
c_str
(),
std
::
ifstream
::
in
);
try
...
...
src/graphicsEngine/WGEZoomTrackballManipulator.cpp
View file @
6a75635e
...
...
@@ -23,6 +23,7 @@
//---------------------------------------------------------------------------
#include "WGEZoomTrackballManipulator.h"
#include "../common/WPreferences.h"
WGEZoomTrackballManipulator
::
WGEZoomTrackballManipulator
()
:
TrackballManipulator
()
...
...
@@ -108,7 +109,11 @@ bool WGEZoomTrackballManipulator::zoom( const osgGA::GUIEventAdapter& ea, osgGA:
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
)
{
return
zoom
(
ea
,
us
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment