Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 7 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Feb 03, 2012
@ramcdona ramcdona Add key-click combinations to emulate 3-button mouse.
MacOS computers usually only have one mouse or trackpad button yet VSP's
pan and zoom functions require at least a second button.  This patch adds
key-click combinations to enable zoom and pan on one-button devices.
All existing button combinations still work.

Alt-Click will now translate.
Ctrl-Click or Meta-Click will now scale.  The Meta key is the Command key
on Mac or the Windows key on PC's.

These keys should be located on both sides of the keyboard -- hopefully
this will work equally well for right- and left-handed users.
aeec1e5
Commits on Feb 22, 2012
@ramcdona ramcdona Change default 4-view settings to standard views.
In a standard 4-view drawing, the isometric view is in the upper-right and
each of the other views is constructed by rotating the model about only
one axis.
70dddbb
@ramcdona ramcdona Fix bug with auto-save messing up normal-save.
The auto-save operation would corrupt the nomral-save file name so the file
would not correctly save after auto-save had occurred.
d3e99c3
@ramcdona ramcdona Merge branch 'JRFixes' into Fixes 9aa98a5
@ramcdona ramcdona Merge branch 'master' of git://github.com/jfenbert/OpenVSP.git into F…
…ixes
4cf77d4
@ramcdona ramcdona Bump version to 2.0.2. d80a431
@ramcdona ramcdona Merge pull request #4 from ramcdona/master
Fixes and version bump to 2.0.2.
7b37d54
View
13 src/vsp/aircraft.cpp
@@ -474,17 +474,20 @@ void Aircraft::reorderGeom( int action )
}
-void Aircraft::writeFile( const char* file_name )
+void Aircraft::writeFile( const char* file_name, bool restore_file_name )
{
vector< Geom* > gVec = geomVec;
gVec.push_back( getUserGeom() );
- writeFile( file_name, gVec, labelVec );
+ writeFile( file_name, gVec, labelVec, restore_file_name );
}
-void Aircraft::writeFile( const char* file_name, vector< Geom * > &gVec, vector< LabelGeom * > &lVec )
+void Aircraft::writeFile( const char* file_name, vector< Geom * > &gVec, vector< LabelGeom * > &lVec, bool restore_file_name )
{
- fileName = file_name;
- setTempDir( fileName, false );
+ if ( !restore_file_name )
+ {
+ fileName = file_name;
+ setTempDir( fileName, false );
+ }
xmlDocPtr doc = xmlNewDoc((const xmlChar *)"1.0");
View
4 src/vsp/aircraft.h
@@ -82,8 +82,8 @@ class Aircraft
VSPDLL int openFile( const char* file_name );
int insertFile( const char* file_name );
- void writeFile( const char* file_name );
- void writeFile( const char* file_name, vector< Geom * > &gVec, vector< LabelGeom * > &lVec );
+ void writeFile( const char* file_name , bool restore_file_name = false );
+ void writeFile( const char* file_name, vector< Geom * > &gVec, vector< LabelGeom * > &lVec, bool restore_file_name = false );
int readFile( const char* file_name );
int readOldRamFile ( const char* file_name );
View
2  src/vsp/main.cpp
@@ -565,7 +565,7 @@ void autoSaveTimeoutHandler(void *data)
{
Stringc backupfn = airPtr->getTempDir();
backupfn.concatenate("vsp_autobackup.vsp");
- airPtr->writeFile(backupfn.get_char_star());
+ airPtr->writeFile(backupfn.get_char_star(), true);
}
Fl::repeat_timeout(VspPreferences::Instance()->autoSaveInterval, autoSaveTimeoutHandler, data );
View
6 src/vsp/main.h
@@ -10,9 +10,9 @@
#ifndef main_h
#define main_h
-#define VSPVERSION1 "Vehicle Sketch Pad 2.0.1"
-#define VSPVERSION2 "OpenVSP 2.0.1 - 2/2/12"
-#define VSPVERSION3 "OpenVSP 2.0.1 : Vehicle Sketch Pad"
+#define VSPVERSION1 "Vehicle Sketch Pad 2.0.2"
+#define VSPVERSION2 "OpenVSP 2.0.2 - 2/21/12"
+#define VSPVERSION3 "OpenVSP 2.0.2 : Vehicle Sketch Pad"
void vsp_exit();
View
23 src/vsp/vspGlWindow.cpp
@@ -322,12 +322,16 @@ void VirtGlWindow::mouseDrag( int mx, int my )
if ( !showFlag )
return;
- if ( (Fl::event_state(FL_BUTTON1) && Fl::event_button3() ) || Fl::event_state(FL_BUTTON2) )
+ if ( (Fl::event_state(FL_BUTTON1) && Fl::event_button3() ) ||
+ (Fl::event_state(FL_BUTTON1) && Fl::event_ctrl() ) ||
+ (Fl::event_state(FL_BUTTON1) && Fl::event_state(FL_META) ) ||
+ Fl::event_state(FL_BUTTON2) )
currTrack.poll( SCALE, mx-wx, my-wy );
+ else if ( Fl::event_state(FL_BUTTON3 ) ||
+ (Fl::event_state(FL_BUTTON1) && Fl::event_alt()))
+ currTrack.poll( TRANSLATE, mx-wx, my-wy );
else if ( Fl::event_state(FL_BUTTON1 ) )
currTrack.poll( ROTATE, mx-wx, my-wy );
- else if ( Fl::event_state(FL_BUTTON3 ) )
- currTrack.poll( TRANSLATE, mx-wx, my-wy );
}
@@ -433,15 +437,22 @@ Fl_Gl_Window(x,y,w,h,"Vsp GL Window")
vWin[TWO_LOW] = new VirtGlWindow( 0, h/2, w, h/2 );
//==== Set Up Initial Viewing Angles ====//
- vWin[FOUR_LOW_L]->currTrack.set_init_angle(PI/2.0, 0.0, 0.0);
+ //vWin[FOUR_LOW_L]->currTrack.set_init_angle(PI/2.0, 0.0, 0.0);
+ vWin[FOUR_LOW_L]->currTrack.set_init_angle(PI/2.0, -PI/2.0, 0.0);
vWin[FOUR_LOW_L]->currTrack.init();
- vWin[FOUR_UP_R]->currTrack.set_init_angle(PI/2.0, -PI/2.0, 0.0);
+ //vWin[FOUR_UP_R]->currTrack.set_init_angle(PI/2.0, -PI/2.0, 0.0);
+ vWin[FOUR_UP_R]->currTrack.set_init_angle(PI/4.0, -PI/6.0, -PI/6.0);
vWin[FOUR_UP_R]->currTrack.init();
- vWin[FOUR_LOW_R]->currTrack.set_init_angle(PI/4.0, -PI/6.0, -PI/6.0);
+ //vWin[FOUR_LOW_R]->currTrack.set_init_angle(PI/4.0, -PI/6.0, -PI/6.0);
+ vWin[FOUR_LOW_R]->currTrack.set_init_angle(PI/2.0, 0.0, 0.0);
vWin[FOUR_LOW_R]->currTrack.init();
+ //vWin[FOUR_UP_L]->currTrack.set_init_angle(0.0, 0.0, 0.0);
+ vWin[FOUR_UP_L]->currTrack.set_init_angle(0.0, 0.0, -PI/2.0);
+ vWin[FOUR_UP_L]->currTrack.init();
+
vWin[TWO_L]->currTrack.set_init_angle(0.0, 0.0, PI/2.0);
vWin[TWO_L]->currTrack.init();

No commit comments for this range

Something went wrong with that request. Please try again.