keep a static of all used view ids. it's necessary since upon restore it can be asked to create view with ids not in crescent order. this should fix the mixing of desktops (and also the problem that the panels forget to be autohide) with pervirtualdesktopviews=true
BUG:207985 BUG:212512 svn path=/trunk/KDE/kdelibs/; revision=1063093
This commit is contained in:
parent
32121a4bdf
commit
6baf2654c0
6
view.cpp
6
view.cpp
@ -47,7 +47,7 @@ public:
|
||||
trackChanges(true),
|
||||
init(false)
|
||||
{
|
||||
if (uniqueId > s_maxViewId) {
|
||||
if (uniqueId > 0 && !viewIds.contains(uniqueId)) {
|
||||
s_maxViewId = uniqueId;
|
||||
viewId = uniqueId;
|
||||
}
|
||||
@ -57,6 +57,7 @@ public:
|
||||
// grab the next available id
|
||||
viewId = ++s_maxViewId;
|
||||
}
|
||||
viewIds.insert(viewId);
|
||||
}
|
||||
|
||||
~ViewPrivate()
|
||||
@ -118,6 +119,8 @@ public:
|
||||
}
|
||||
|
||||
static int s_maxViewId;
|
||||
//ugly but the only reliable way to do collision detection of ids
|
||||
static QSet<int> viewIds;
|
||||
|
||||
Plasma::View *q;
|
||||
Plasma::Containment *containment;
|
||||
@ -130,6 +133,7 @@ public:
|
||||
};
|
||||
|
||||
int ViewPrivate::s_maxViewId(0);
|
||||
QSet<int> ViewPrivate::viewIds;
|
||||
|
||||
View::View(Containment *containment, QWidget *parent)
|
||||
: QGraphicsView(parent),
|
||||
|
Loading…
Reference in New Issue
Block a user