Permalink
Browse files

By default select the OLS device as capturing device; after a capture…

… is complete, or a project is loaded, zoom diagram to fit window.
  • Loading branch information...
1 parent bc925f9 commit 1c6f05e2a70c7dee5d175cecef658862297f3df3 @jawi committed Nov 27, 2011
View
13 client/src/main/java/nl/lxtreme/ols/client/ClientController.java
@@ -279,8 +279,8 @@ public ClientController( final BundleContext aBundleContext )
public void acquisitionComplete( final AcquisitionResult aData )
{
setAcquisitionResult( aData );
-
- updateActionsOnEDT();
+ // XXX zoom to fit; shouldn't we restore the last zoom settings?
+ zoomToFit();
}
/**
@@ -959,8 +959,10 @@ public void openDataFile( final File aFile ) throws IOException
OlsDataHelper.read( tempProject, reader );
setChannelLabels( tempProject.getChannelLabels() );
- setAcquisitionResult( tempProject.getCapturedData() );
setCursorData( tempProject.getCursorPositions(), tempProject.isCursorsEnabled() );
+ setAcquisitionResult( tempProject.getCapturedData() );
+ // XXX zoom to fit; shouldn't we restore the last zoom settings?
+ zoomToFit();
setStatusOnEDT( "Capture data loaded from {0} ...", aFile.getName() );
}
@@ -2012,11 +2014,6 @@ public void run()
private void setAcquisitionResult( final AcquisitionResult aData )
{
this.dataContainer.setCapturedData( aData );
-
- if ( this.mainFrame != null )
- {
- this.mainFrame.zoomDefault();
- }
}
/**
View
4 client/src/main/java/nl/lxtreme/ols/client/MainFrame.java
@@ -689,8 +689,8 @@ else if ( ProjectProperties.PROPERTY_NAME.equals( propertyName ) )
public void readPreferences( final UserSettings aSettings )
{
// Detour: make sure the controller does this, so the actions are correctly
- // synchronized...
- this.controller.selectDevice( aSettings.get( "selectedDevice", "" ) );
+ // synchronized; make sure the OLS device is selected by default...
+ this.controller.selectDevice( aSettings.get( "selectedDevice", "OpenBench LogicSniffer" ) );
}
/**

0 comments on commit 1c6f05e

Please sign in to comment.