Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/KisImageBarrierLockerWithFeedback.cpp
Show All 23 Lines | |||||
24 | 24 | | |||
25 | #include "kis_image.h" | 25 | #include "kis_image.h" | ||
26 | 26 | | |||
27 | namespace KisImageBarrierLockerWithFeedbackImplPrivate { | 27 | namespace KisImageBarrierLockerWithFeedbackImplPrivate { | ||
28 | void blockWithFeedback(KisImageSP image) | 28 | void blockWithFeedback(KisImageSP image) | ||
29 | { | 29 | { | ||
30 | if (!image) return; | 30 | if (!image) return; | ||
31 | 31 | | |||
32 | // TODO1: find the window corrsponding to the awaited image! | 32 | // TODO1: find the window corresponding to the awaited image! | ||
33 | // TODO2: move blocking code from KisViewManager here | 33 | // TODO2: move blocking code from KisViewManager here | ||
34 | KisMainWindow *window = KisPart::instance()->currentMainwindow(); | 34 | KisMainWindow *window = KisPart::instance()->currentMainwindow(); | ||
35 | if (!window) return; | 35 | if (!window) return; | ||
36 | 36 | | |||
37 | KisViewManager *viewManager = window->viewManager(); | 37 | KisViewManager *viewManager = window->viewManager(); | ||
38 | viewManager->blockUntilOperationsFinishedForced(image); | 38 | viewManager->blockUntilOperationsFinishedForced(image); | ||
39 | } | 39 | } | ||
40 | } | 40 | } |