Commit 97e726e8 authored by Marco Martin's avatar Marco Martin
Browse files

fix restore size when float is used

it was technically possible for geometries to not be integer, but
a string to int parse was done, so teoretically string.toInt() can
fail and reset position/size of the plasmoid.
It may be the cause of some of the positions lost bugs.
This was particularly evident and triggerable in plasma mobile.
on palsma mobile side was also fixed by making suire the grid size is
always int, however technically the bug is here too as well
parent 497faddb
......@@ -64,7 +64,7 @@ void GridLayoutManager::parseLayout(const QString &savedLayout)
continue;
}
m_parsedConfig[id] = {itemGeom[0].toInt(), itemGeom[1].toInt(), itemGeom[2].toInt(), itemGeom[3].toInt(), itemGeom[4].toInt()};
m_parsedConfig[id] = {itemGeom[0].toDouble(), itemGeom[1].toDouble(), itemGeom[2].toDouble(), itemGeom[3].toDouble(), itemGeom[4].toDouble()};
}
}
......
......@@ -27,11 +27,11 @@ class AppletsLayout;
class ItemContainer;
struct Geom {
int x;
int y;
int width;
int height;
int rotation;
qreal x;
qreal y;
qreal width;
qreal height;
qreal rotation;
};
class GridLayoutManager : public AbstractLayoutManager
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment