Skip to content

Commit

Permalink
By default select the OLS device as capturing device; after a capture…
Browse files Browse the repository at this point in the history
… is complete, or a project is loaded, zoom diagram to fit window.
  • Loading branch information
jawi committed Nov 27, 2011
1 parent bc925f9 commit 1c6f05e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions client/src/main/java/nl/lxtreme/ols/client/ClientController.java
Expand Up @@ -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();
}

/**
Expand Down Expand Up @@ -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() );
}
Expand Down Expand Up @@ -2012,11 +2014,6 @@ public void run()
private void setAcquisitionResult( final AcquisitionResult aData )
{
this.dataContainer.setCapturedData( aData );

if ( this.mainFrame != null )
{
this.mainFrame.zoomDefault();
}
}

/**
Expand Down
4 changes: 2 additions & 2 deletions client/src/main/java/nl/lxtreme/ols/client/MainFrame.java
Expand Up @@ -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" ) );
}

/**
Expand Down

0 comments on commit 1c6f05e

Please sign in to comment.