Skip to content

Commit

Permalink
0.919
Browse files Browse the repository at this point in the history
  • Loading branch information
konnibe committed May 26, 2012
1 parent 0aa6ea4 commit eaaeacf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Logbook.cpp
Expand Up @@ -1573,7 +1573,7 @@ void Logbook::getModifiedCellValue(int grid, int row, int selCol, int col)
s.Replace(_T(","),_T(".")); s.Replace(_T(","),_T("."));
s.ToDouble(&d); s.ToDouble(&d);
int h = (int) d; int h = (int) d;
int m = 60*(d - h); int m = (60*(d - h));
s = wxString::Format(_T("%i:%i"),h,m); s = wxString::Format(_T("%i:%i"),h,m);


} }
Expand All @@ -1594,8 +1594,8 @@ void Logbook::getModifiedCellValue(int grid, int row, int selCol, int col)
tkz1.GetNextToken().ToDouble(&hc); tkz1.GetNextToken().ToDouble(&hc);
tkz1.GetNextToken().ToDouble(&mc); tkz1.GetNextToken().ToDouble(&mc);


hc_ = hc + (mc*(100/60)/100); hc_ = hc + ((mc*(100.0/60.0))/100);
hp_ = hp + (mp*(100/60)/100); hp_ = hp + ((mp*(100.0/60.0))/100);


res = hc_ - hp_; res = hc_ - hp_;


Expand Down Expand Up @@ -1793,10 +1793,10 @@ wxString Logbook::decimalToHours(double res,bool b)
{ {
int h = (int) res; int h = (int) res;
double m = res - h; double m = res - h;
//m = m * (60/100) * 100; m = m * (60.0/100.0)*100;


wxString fmt = (b)?_T("%05i:%02.0f %s"):_T("%02i:%02.0f %s"); wxString fmt = (b)?_T("%05i:%02.0f %s"):_T("%02i:%02.0f %s");
wxString str = wxString::Format(fmt,h,m*100,opt->motorh.c_str()); wxString str = wxString::Format(fmt,h,m,opt->motorh.c_str());
return str; return str;
} }


Expand Down
3 changes: 2 additions & 1 deletion src/logbook_pi.cpp
Expand Up @@ -618,7 +618,8 @@ void logbookkonni_pi::ShowPreferencesDialog( wxWindow* parent )
optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 655,586 ), optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 655,586 ),
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
#elif defined __WXOSX__ #elif defined __WXOSX__
optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 650,691 ) ,wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 650,691 ) ,
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
#else #else
optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 740,659 ) , optionsDialog = new LogbookOptions(parent, opt, this, -1, _("Logbook Preferences"), wxDefaultPosition, wxSize( 740,659 ) ,
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
Expand Down

0 comments on commit eaaeacf

Please sign in to comment.