Ticket #10798 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Setup 3D Visualization Dialog appears underneath Splashscreen on Windows

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: blocker Milestone: Release 3.3
Component: GUI Keywords:
Cc: Blocked By:
Blocking: Tester: Federico M Pouzols

Description

This is a regression and it looks odd so we should fix this for the release.

Attachments

3DSetupSplashBug-Windows.png (69.6 KB) - added by Martyn Gigg 6 years ago.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Status changed from new to assigned

Changed 6 years ago by Martyn Gigg

comment:2 Changed 6 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

comment:3 Changed 6 years ago by Martyn Gigg

Make sure the 3D visualization dialog sits on top of everything

This only affects Windows as other environments dont use this. Refs #10798

Changeset: a647f264674657e2553709afc4ab6fc79bad4e79

comment:4 Changed 6 years ago by Martyn Gigg

  • Status changed from inprogress to verify
  • Resolution set to fixed

Branch: bugfix/10798_setup_pv_z_order

Tester: This needs to be tested on Windows. In preparation you also need to remove any reference to paraview.path from the Mantid.user.properties file.

Check before merging the code that you see a similar situation to the screenshot. After merging the branch you should see the dialog on top of the splashscreen.

comment:5 Changed 6 years ago by Federico M Pouzols

  • Status changed from verify to verifying
  • Tester set to Federico M Pouzols

comment:6 Changed 6 years ago by Federico M Pouzols

This is working well, the behavior has changed and if I remove paraview.path from the settings file, the 3D setup dialog will pop up first and stay on top.

There is an ugly glitch though. When I close the 3D setup dialog, which typically overlaps at least partially with the splash window, the splash window does not refresh very quickly. For a couple of seconds, while mantid is initializing, you can see the splash window with parts of the contents of the (closed) 3D setup dialog. Then, the splash window refreshes just a fraction of a second before MantidPlot pops up. I guess this could be sorted out by forcing a repaint or similar on the spash window after the 3D settings dialog closes.

Not sure if we want to be picky about this cosmetic issue. Should I go ahead and merge?

comment:7 Changed 6 years ago by Federico M Pouzols

I had a look, I see it's not easy to do a splash repaint, as that is in main and what is taking a long time is the long ApplicationWindow::init() method. But the ugly glitch can be sorted out just by adding (yet one more) processEvents() call on qApp, right after trySetParaviewPath(args) (diff below).

This solves the issue, at least on windoze 7, and I guess should be safe in general, even though it seems we are getting into moody Qt and OSes behavior.

diff --git a/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp b/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
index 54952e1..05e0c97 100644
--- a/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
+++ b/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
@@ -360,6 +360,7 @@ void ApplicationWindow::init(bool factorySettings, const QStringList& args)
   // Set the Paraview path BEFORE libaries are loaded. Doing it here prevents
   // the logs being poluted with library loading errors.
   trySetParaviewPath(args);
+  qApp->processEvents();

   using Mantid::Kernel::ConfigService;
   auto & config = ConfigService::Instance(); // Starts logging

Let me know what you think is best and I'll pass the ticket.

comment:8 Changed 6 years ago by Martyn Gigg

Process all pending GUI events before loading Mantid

Refs #10798

Changeset: 322d2cf5d121f2814b9f210286240611cdf742c0

comment:9 Changed 6 years ago by Martyn Gigg

I agree, this is better now. Sometimes processEvents is necessary for keeping things responsive and I think it is justified here.

comment:10 Changed 6 years ago by Federico Montesino Pouzols

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/10798_setup_pv_z_order'

Full changeset: 39891485d89c077c1c484eb34c27712376db09e1

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11640

Note: See TracTickets for help on using tickets.