Fix syncing pixel grid state between windows once again
ClosedPublic

Authored by dkazakov on Jan 29 2018, 8:27 AM.

Details

Summary

This patch extends commit 1a47ae24712377821994c3b0309b9437da129d73 and
addresses the following issues:

  1. The state of the menu action checkbox was not updated when the other window changed the its state
  2. There should be no access to KisConfig in the OpenGL rendering loop (it is slow due to possible disk access).
  3. A canvas update call should be issued right after the config changed, otherwise the old state of the grid will be visible until one hovers the canvas

BUG: 389033

Test Plan
  1. Open multiple Krita windows and zoom both of them to 1000%
  2. Change View->Show Pixel Grid in one of the windows
  3. The state on the checkbox and the canvas should automatically update in the other window

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dkazakov requested review of this revision.Jan 29 2018, 8:27 AM
dkazakov created this revision.
dkazakov edited the summary of this revision. (Show Details)Jan 29 2018, 1:34 PM
scottpetrovic accepted this revision.Jan 29 2018, 9:36 PM

This looks good to me Dmitry! Good job.

I switched views and the pixel grid seems to be in sync.

This revision is now accepted and ready to land.Jan 29 2018, 9:36 PM
This revision was automatically updated to reflect the committed changes.