always ensure we have a valid view id.
BUG:163053 svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=819127
This commit is contained in:
parent
39230257f7
commit
b36bca71ca
14
view.cpp
14
view.cpp
@ -39,15 +39,19 @@ public:
|
||||
trackChanges(true),
|
||||
desktop(-1),
|
||||
containment(0),
|
||||
q(view)
|
||||
|
||||
q(view),
|
||||
viewId(0)
|
||||
{
|
||||
if (uniqueId == 0) {
|
||||
viewId = ++s_maxViewId;
|
||||
} else if (uniqueId > s_maxViewId) {
|
||||
if (uniqueId > s_maxViewId) {
|
||||
s_maxViewId = uniqueId;
|
||||
viewId = uniqueId;
|
||||
}
|
||||
|
||||
if (viewId == 0) {
|
||||
// we didn't get a sane value assigned to us, so lets
|
||||
// grab the next available id
|
||||
viewId = ++s_maxViewId;
|
||||
}
|
||||
}
|
||||
|
||||
~Private()
|
||||
|
Loading…
x
Reference in New Issue
Block a user