another attempt to get rid of the bugs reported in MUSR-115 (d-f-d, f-d-f issues in the key event handling of musrview

This commit is contained in:
nemu
2010-08-19 13:33:57 +00:00
parent 5b6e04fc97
commit 0d4dc340ad
2 changed files with 17 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# ChangeLog # ChangeLog
# BMW, 2010/08/17 # AS, 2010/08/19
# $Id: # $Id$
#--------------------------------------------------------------------- #---------------------------------------------------------------------
changes since 0.6.0 changes since 0.6.0
@ -18,6 +18,7 @@ NEW integration of a few external musrfit plug-ins into the standard build proce
NEW default estimates for 'data' and 'background' entries in RUN blocks NEW default estimates for 'data' and 'background' entries in RUN blocks
NEW directory with some msr- and data-files for quick testing of new musrfit installations NEW directory with some msr- and data-files for quick testing of new musrfit installations
NEW option to musrt0: the key 'T' will set the t0 cursor to the maximum of the histogram NEW option to musrt0: the key 'T' will set the t0 cursor to the maximum of the histogram
FIXED next attempt to fix the d-f-d (MUSR-115) issue
FIXED formatting of the ASCII fit output file for long parameter names (MUSR-142) FIXED formatting of the ASCII fit output file for long parameter names (MUSR-142)
FIXED time window frame bug in musrview (MUSR-138) FIXED time window frame bug in musrview (MUSR-138)
FIXED calculation of LF relaxation functions for big static widths (MUSR-139) FIXED calculation of LF relaxation functions for big static widths (MUSR-139)

View File

@ -721,6 +721,18 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
// handle keys and popup menu entries // handle keys and popup menu entries
enum eKeySwitch {kNotRelevant, kData, kDiffData, kFourier, kDiffFourier, kFourierDiff}; enum eKeySwitch {kNotRelevant, kData, kDiffData, kFourier, kDiffFourier, kFourierDiff};
eKeySwitch relevantKeySwitch = kNotRelevant; eKeySwitch relevantKeySwitch = kNotRelevant;
static eKeySwitch lastKeySwitch = kNotRelevant;
if ((lastKeySwitch == kFourierDiff) && (x == 'f')) {
cout << "debug> f-d-f doesn't make any sense, will ignore 'f' ..." << endl;
return;
}
if ((lastKeySwitch == kDiffFourier) && (x == 'd')) {
cout << "debug> d-f-d doesn't make any sense, will ignore 'd' ..." << endl;
return;
}
if (x == 'q') { // quit if (x == 'q') { // quit
Done(0); Done(0);
} else if (x == 'd') { // difference } else if (x == 'd') { // difference
@ -813,6 +825,8 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
fMainCanvas->Update(); fMainCanvas->Update();
} }
lastKeySwitch = relevantKeySwitch;
// call the apropriate functions if necessary // call the apropriate functions if necessary
switch (relevantKeySwitch) { switch (relevantKeySwitch) {
case kData: // show data case kData: // show data