Ticket #7865 (closed: fixed)
Color Fill axes revert to old values when switching axes without applying
Reported by: | Keith Brown | Owned by: | Keith Brown |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.0 |
Component: | GUI | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #8035 | Tester: | Nick Draper |
Description (last modified by Keith Brown) (diff)
A cleaner version of #4066 omitting already fixed issues and wording the core issue better. Was originally observed on Mac, but has been confirmed on Windows and Ubuntu too.
Editing the axes in the Color Fill Plot window keeps resetting the values of an axis back to their original values if they're altered, then another axis is switched to without applying the changes.
This is true for all values on the Scale tab as well as the Title field in the Axis Tab.
EDIT: the issue affected the entire dialog on all tabs, from apply bypasses to more loss of data
Attachments
Change History
comment:2 Changed 7 years ago by Keith Brown
This ticket will involve a heavy re-write of a relic of QTIplot which by the looks of it was coded VERY badly - This bug is actually still in QTIplot by the looks of the source code i downloaded.
In and ideal situation, I would totally recreate the dialogue in QTDeisgner to have it fit in with the split UI and functionality design of the newer mantid dialogues (tidying up the code, getting rid of the pixmaps, and generally writing it better) but Nick said it wouldn't be worth the time it'd take to re-write it in it's entity.
My solution is to have the axes groupbox work like the CreateSampleShapeDialog, where the QListItems are the Keys in a map that holds corresponding QWidgets that contain the controls holding that axis' parameters while they're being edited (swapping the Qwidget when the axis is changes). Then when Apply or OK are clicked, press the values held in the Qwidget to the graph.
comment:3 Changed 7 years ago by Keith Brown
- Status changed from new to inprogress
Started refactoring the code
At present the code won't compile, this is just an end-of-day commit
AxisDetails contains two new classes ScaleAxisDetails and AxisAxisDetails, these will contian all the options prior to pressing.
At the moment I'm focusing on the Scale tab migrating all the controls and signals into the new object. At the same time i've renamed most of the controls slightly to reflect what kind of widget they are.
Refs #7865
Changeset: 0f7ee9632b07f0d7d17a6b28165b667bee790439
comment:4 Changed 7 years ago by Keith Brown
Code now compiles, still not working though
Working on refactoring the code. At present I've ported the code into the ScaleAxisDetails class that deals with crating the UI and populating them.
Next I'll be altering the Dialog to actually use the class when populating itself.
I have found a bunch of functions that don't seem to do anything so they're disabled until i can find out if they actually do something
Refs #7865
Changeset: dd4442bdd34a7225f8db00560eaa16218f776ad6
comment:5 Changed 7 years ago by Keith Brown
Committing to github due to having to reinstall guest OS on VirtualBox
The Virtual Machine I've been fixing this ticket in has developed a problem and I need to reinstall it, so I'm pushing my changes to back them up.
The code is not fixed as I was trying to find the source of some unexpected behavior before this OS problem occured.
Refs #7865
Changeset: 97178b31a037c223f87f71d0f8d4ddc90a01bc9f
comment:6 Changed 7 years ago by Keith Brown
Found a solution to the core issue: A QStackLayout
The layout can have all the axes options in it at the same time, but will only show one at a time. this keeps the values in memory and doesn't produce any unwanted behavior. It easily links with a QListWidget as the selection changed signal from the list can integrate well with the setCurrentIndex of the layout
I've also found a lot of options (especially in the general tab) are bypassing the apply method, and pressing their changes straight away. These will be fixed as I rewrite the apply method to press changes from all tabs rather than the current tab/axis only.
comment:7 Changed 7 years ago by Keith Brown
Added QStackedLayout to Scale, reodered functions, started Axes
Solved the core issue in teh scale tab and now moving to do the same in the axes tab.
Reordered the functions in AxesDailog to make more sense and to group related functions together as i'll be mergin/deleting a load when i get to rewriting the newly renamed Apply() (formerly UpdatePlot())
refs #7865
Changeset: 146238078287a782e9f985400715458bed802246
comment:8 Changed 7 years ago by Keith Brown
Both tabs now save their values between switches
I've fixed the core issue, now i'm onto writing the apply methods for both and making sure the whole dialog opperates like the user would expect.
Refs #7865
Changeset: 533681017970f9f6f3bf9a5a16c194b5ffb67d9d
comment:9 Changed 7 years ago by Keith Brown
Split AxisDeatils into separate files for each class.
AxisDetails.h and .cpp have been split into AxisAxisDetails and ScaleAxisDetails .h and .cpp like they really should have been from the beginning.
Refs #7865
Changeset: d1600c1d4f57ff73f7b3216f925e799a6eaabb0b
comment:10 Changed 7 years ago by Keith Brown
Added a "modified" signal to TextFormatButtons
As i'm not sure that the edits done to the text feild by TextFormatButtons, i've added a signal that will fire if anything in it is clicked as if to say "the formatting has been changed"
Refs #7865
Changeset: 535f5dc3a0744b4312c8f351790cba15c312416e
comment:11 Changed 7 years ago by Keith Brown
Axis tab now applys, continuing work on scale tab
Added the modified and valid flags to both classes in order to streamline applying.
AxisAxisDetials is now pessing chages to the graph, but the section in AxesDialog is not complete and the code there is just for testing.
Refs #7865
Changeset: 180bd4fa011d46b38b9527dd103c60d95353e727
comment:12 Changed 7 years ago by Keith Brown
Discovered Grid tab had the same problem
Added a new class GridDetails, as the Grid tab has a similair problem to the Scale and Axis tabs. So i plan to solve it in the same way.
Refs #7865
Changeset: 3677c24bc52010da51e978895978cf9daef93b2d
comment:14 Changed 7 years ago by Keith Brown
Changed names, got 3 sections working
ScaleAxis- and AxisAxis- Details have had their anmes changed on martyn's suggestion Scale, Axis and Grid tabs are now working and pressing changes to the graph The grid tab has had some structural changes so it makes for sense and behavior can be inferred better.
Refs #7865
Changeset: 9bfe28b7fb17904bcfdc9b19a7a5d8aca0e3bbde
comment:15 Changed 7 years ago by Keith Brown
Getting rid of some old code
Just deleted some of the code i'd commented out while refactoring.
Also added some bits i missed to one of the apply methods
the next job is the general tab and valiadtion across all tabs needs polishing
Refs #7865
Changeset: 6373abe78267fd719f532dc20e51b13414fdaad3
comment:16 Changed 7 years ago by Keith Brown
Finished refactoring and fixing
Everything is fixed as far as I can tell. I'm now preparing it for testing, but due to concerns about how long some things have taken I'm going to run it through some profiling tools first.
EDIT: After a discussion with Owen, I'll check to see if the performance issues go away when built in release or after #8035 has been fixed.
Refs #7865
Changeset: 69dfd3326a0907dc3a1e41c7885dbe859af48f90
comment:17 Changed 7 years ago by Keith Brown
Fixed up formatting and style
Made a load of variable names more descriptive and in line with the coding standards.
A load of ambiguous If and switch statements have been made less so.
Removed my comment notes that weren't needed any more.
Refs #7865
Changeset: 1082c8e388f1630d5e184bd340834ea8d28f149d
comment:18 Changed 7 years ago by Keith Brown
Fished documenting for doxygen
Added doxygen parseable comments for all methods in the classes i've been working on
Refs #7865
Changeset: 03b87305ebbee3464a7004345ba85c23f7f64e91
comment:19 Changed 7 years ago by Keith Brown
fixed a couple fo copy/paste errors
A couple fo bits of documentation were wrong due to copy/paste erros, fixed them.
Refs #7865
Changeset: 046aca9c933336f9238e10fcce64df0461b93695
comment:20 Changed 7 years ago by Keith Brown
- Status changed from inprogress to verify
- Resolution set to fixed
To tester(s):
The dialog box is fixed, keeps it's values on tab and axis switching and should operate according to common sense, and shouldn't apply anything to the graph without OK or Apply being clicked.
The dialog box is question can be obtained from a graph windows by double-clicking a scale or by right clicking (or the mac alternative) an axis and clicking "Properties..."
This needs to be tested on all supported OSes (Windows, Mac, Red Hat, Ubuntu) for all of the following types of graph and additions to them:
- 1D plots
- adding extra curves to 1D plots
- Color fill plots ("show axis break" does NOT work on Color fill plots, and doesn't seem to be the fault of this dialog, although I'm happy to be proved wrong)
- Color fill plots with contours (assumed to have the same fault as Color fill plots)
For each of those graph plots, make all sure the settings in the dialog work as expected, no settings are lost if tabs or axes are switched before apply is pressed, and that no option presses the options to the graph without apply or OK being pressed.
When you accept for testing can you note your operating system and once you're done, FAIL the test and return this ticket to the testing pool assuming it has passed on your OS. Do not merge this into master until all the operating systems have been tested on.
comment:21 Changed 7 years ago by Russell Taylor
There's a compiler warning needs fixing:
GridDetails.cpp:139, GNU Compiler 4 (gcc), Priority: Normal unused variable ‘p’
comment:22 Changed 7 years ago by Keith Brown
I'll fix that tomorrow when I'm back at my desk.
comment:23 Changed 7 years ago by Keith Brown
Fixed compiler warning
stopped a gcc compiler warning complaining about an unused variable
Refs #7865
Changeset: c15ea7c39d300aa2449387d3cc866cdfde9a99a0
comment:24 Changed 7 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:25 Changed 7 years ago by Martyn Gigg
- Status changed from verifying to reopened
- Resolution fixed deleted
I didn't manage to get very far here. When you plot, right click and then select "Properties" there is a flicker of numerous dialogs being opened & closed before the main dialog is opened. This needs fixing before further testing.
comment:26 Changed 7 years ago by Keith Brown
- Status changed from reopened to inprogress
Stopped flicker on dialog open
Martyn noticed window flicker when the dialog was started, this seemed to be because of a delay between the QStackLayout being initialised and beng added to the dialog. They are now added as soon as they can be after initalisation.
Refs #7865
Changeset: 9b71fed155392c4eb85d75657ca6abdcdd34f7e0
comment:27 Changed 7 years ago by Keith Brown
- Status changed from inprogress to verify
- Resolution set to fixed
comment:28 Changed 7 years ago by Owen Arnold
- Status changed from verify to verifying
- Tester changed from Martyn Gigg to Owen Arnold
comment:29 Changed 7 years ago by Owen Arnold
- Status changed from verifying to reopened
- Resolution fixed deleted
There's definitely something weird going on here with the scale->from option. Hitting apply after changing this using the version in mantid nightly (off master branch) works. Changing this on my mac does not result in an updated axis limits based on the changes made in this ticket.
After some further investigation, this is solved when you change focus out of the input text box just changed before hitting apply. The solution would be something along the lines of forcing the focus to change out of whatever text box is selected before doing the usual work.
comment:30 Changed 7 years ago by Keith Brown
I had a feeling something like this would occur...
Looking into moving focus away from the active widget when apply or OK is clicked
comment:31 Changed 7 years ago by Keith Brown
- Status changed from reopened to inprogress
Focus given to clicked button
Hopefully this change in focus on click should fire the signals that weren't being fired on Mac before.
Refs #7865
Changeset: 57356c5f288796f08160a43815ca7a1cc7704440
comment:32 Changed 7 years ago by Keith Brown
- Status changed from inprogress to verify
- Resolution set to fixed
comment:33 Changed 7 years ago by Owen Arnold
This works on the Mac now, the previous bug raised has been fixed. This will need to be retested on all the other target platforms that Keith has identified.
comment:34 Changed 7 years ago by Vickie Lynch
All the suggested tests work on Rhel 6
comment:35 Changed 7 years ago by Keith Brown
Upgraded Ubuntu testing from "a bonus" to "required"
comment:36 Changed 7 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester changed from Owen Arnold to Martyn Gigg
comment:37 Changed 7 years ago by Martyn Gigg
- Status changed from verifying to verify
- Tester Martyn Gigg deleted
Everything seems in order on Windows too.
comment:39 Changed 7 years ago by Gesner Passos
- Status changed from verify to reopened
- Resolution fixed deleted
I will point here things that was working before and now isn't.
I have tested only ColorFillPlot for the attached workspace in Ubuntu.
- In the Tab (Scale), change Radio to Step, and you will not be allowed to select Major Ticks again.
- Go to Tab (Axis), select Left Axis, change the Type to Date (I know it is a silly option), but it should not crash Mantid.
- Go to Tab (Grid), Select Vertical, Select Major Grids, apply (you've got an Horizontal grid)
- Go to Tab (Grid), Select Horizontal, Select Major Grids, apply, and you have the horizontal grid. Select Antialised. Apply. And the grid disappears. Increase the tickeness. Apply. The grid reappears. Besides, I have no idea what Antialised was supposed to do. A ToolTip is worth to define its behavior.
comment:40 Changed 7 years ago by Keith Brown
issues in order:
1 : this was a copy/paste error in the click event, fixed
2 : working on finding the cause of this as the validation should still be there
3 : vertical grids restored, a bit of "default value" setting had an OR instead of AND
4 : tooltip for anti-ailiased won't happen, that's beyond the scope if this, add it to #8198. Can't seem to reproduce the issue on windows though.
comment:41 Changed 7 years ago by Keith Brown
issue two should be sorted, it was an out of bounds error as for some reason a QStringlist's operator [] wasn't allowing the addition of a new entry at position 1. changed to use push_back() instead. it now produces what it can rather than outright crashing, even if it isn't relevant to the data.
comment:42 Changed 7 years ago by Keith Brown
- Status changed from reopened to inprogress
Fixed issues highlighted by tester
Fixed the first 3, and may have inevertantly fixed the 4th, of the issues highlighted by gesner.
ScaleDetails had a wrong widget name thus was defauting to its else case.
AxisDetails has had an opperator [] change to a .push_bach()
GridDetails had a defualt value check with the wrong boolean opperator
Refs #7865
Changeset: edba096b3d550a314d233cab5273f57ec87fa666
comment:43 Changed 7 years ago by Keith Brown
- Status changed from inprogress to verify
- Resolution set to fixed
comment:44 Changed 7 years ago by Keith Brown
All OSes must be tested again. Can testers please test every widget on the dialog! as the issues Gesner highlighted should have been present on all OS yet three testers passed it on their systems, as the first 3 were on windows and i should have seen them before marking fixed
comment:45 Changed 7 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
comment:46 Changed 7 years ago by Karl Palmen
- Status changed from verifying to reopened
- Resolution fixed deleted
Gesner had had problems when testing this.
comment:47 Changed 7 years ago by Keith Brown
- Status changed from reopened to inprogress
Gesner has found more problems:
The combo-box in the grid tab doesn't work fully (although a quick look at the code makes me think i know what's wrong here)
The issue with the Date or time formats isn't crashing any more but had potential to cause a different problem, i need to find out where that validation was and re-enable it.
comment:48 Changed 7 years ago by Vickie Lynch
Just noticed that the last time I was testing in Rhel6 everything worked well, but I got lots of these errors in the screen where I started MantidPlot: (process:28364): Gtk-CRITICAL : gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(process:28364): GnomeUI-CRITICAL : gnome_icon_lookup: assertion `GTK_IS_ICON_THEME (icon_theme)' failed
I did use scl enable mantidlibs for the make.
comment:49 Changed 7 years ago by Keith Brown
fixed one problem, not the other
Fixed the date/time problem, not got the grid combo box working
refs #7865
Changeset: 71850218a42defb8d82aaee851a9109bfcac10a7
comment:50 Changed 7 years ago by Keith Brown
Restored multi-window grid application
Found out that my own modified flag was working agianst me, built a manual override into the funtion parameters that will allow the gridDetails::apply function to work multiple times
Refs #7865
Changeset: bd69d006952b72010f6160b662264a88ff23c369
comment:51 Changed 7 years ago by Keith Brown
- Status changed from inprogress to verify
- Resolution set to fixed
As for the GTK issues mentioned by Vicky, I've no way of testing this out to find out what's causing it, although Martyn told me that it's probably not his ticket.
So i'm putting this in for testing hopeing that it won't crop up
comment:52 Changed 7 years ago by Karl Palmen
I'm going to test on Windows, but the build is taking a long time again. I'll take the ticket for testing when ready to test or just put a message in about the testing.
comment:54 Changed 7 years ago by Gesner Passos
I've tested in Ubuntu 12.04 and I could not spot any additional bugs worth mentioning. My suggestions for improvement have their own ticket #8198. But, I consider that what was done here provided a significant improvement and is worth going to master. My vote is YES. ;)
comment:55 Changed 7 years ago by Keith Brown
Ubuntu is done, still need windows, Mac and Rhel6
comment:56 Changed 7 years ago by Karl Palmen
- Status changed from verifying to verify
- Tester Karl Palmen deleted
Testing on Windows has shown no faults.
However I have been unable to test contour plots, because I was unable to figure out how to produce a contour plot. The wiki page http://www.mantidproject.org/Mantid_Examples:_Simple1D_and_contour_plotting was not helpful. I failed to understand it because of its use of an undefined concept of workspace window.
comment:57 Changed 7 years ago by Keith Brown
Still looking for Mac and rhel6, as well as a second windows tester for the part Karl couldn't test
comment:58 Changed 7 years ago by Vickie Lynch
You can plot contour lines onto your colour maps. Double click within the data of the plot (or right click and select properties). In the Plot Details dialog that appears select UserHelperFunction in the left hand pane. Select the Contour Lines tab Here you can set the values for the contours and the pen contour and line thickness etc. Click Ok and the contour lines will appear on your plot.
comment:59 Changed 7 years ago by Vickie Lynch
Testing on Rhel6 shows problems mentioned before have been fixed. Works with contours. No GTK warnings; I guess I built with the correct library this time.
comment:60 Changed 7 years ago by Keith Brown
Just Mac remains, windows also needs finishing off.
comment:61 Changed 7 years ago by Karl Palmen
I'm building for windows test.
comment:62 Changed 7 years ago by Karl Palmen
Windows test passed (with contours).
comment:63 Changed 7 years ago by Keith Brown
Only Mac needs testing on now.
comment:64 Changed 7 years ago by Russell Taylor
I've had a look on the Mac, checking in particular the items mentioned/fixed since the last time it was checked on this OS. Things look OK to me.
comment:65 Changed 7 years ago by Keith Brown
If that's an OK from Russell than all OSes have passed so this just needs merging to master.
comment:66 Changed 7 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
comment:67 Changed 7 years ago by Nick Draper
I'll do the merge
comment:68 Changed 7 years ago by Nick Draper
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/7865_fix_color_fill_axes_options'
Full changeset: bacd13ffbd29669198cfd864aa070b2f3ad7dc01
comment:69 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8710