view:unblock events when user undo removal

--this way when a dock or panel is scheduled for
removal but the user undo that removal all
events for main dock/panel window are forwarded
correctly. As  a side fix parabolic effect works
just fine now is such scenario.
pull/27/head
Michail Vourlakos 3 years ago
parent b72037af7e
commit a5df2865ba

@ -190,6 +190,10 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassX11WM)
emit inEditModeChanged(); emit inEditModeChanged();
}); });
connect(this->containment(), &Plasma::Containment::destroyedChanged, this, [&]() {
m_inDelete = containment()->destroyed();
});
if (m_corona->viewSettingsFactory()->hasOrphanSettings() if (m_corona->viewSettingsFactory()->hasOrphanSettings()
&& m_corona->viewSettingsFactory()->hasVisibleSettings() && m_corona->viewSettingsFactory()->hasVisibleSettings()
&& m_corona->viewSettingsFactory()->lastContainment() == containment()) { && m_corona->viewSettingsFactory()->lastContainment() == containment()) {
@ -523,8 +527,6 @@ void View::newView(const QString &templateFile)
void View::removeView() void View::removeView()
{ {
if (m_layout) { if (m_layout) {
m_inDelete = true;
QAction *removeAct = action("remove"); QAction *removeAct = action("remove");
if (removeAct) { if (removeAct) {

Loading…
Cancel
Save