Details
Diff Detail
- Repository
- R55 Cantor
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
This code works, but there are two problems
- I can't save, what right tab was choosen before user changes worksheet
- This code not good integrate in existing code
@asemke, I hope, you could help with second problem.
We can add the information about the active panels to CantorPart directly. When switching between the different worksheets we can save the list of names of the opened panels to the corresponding CantorPart. This QStringList can be used as the paratemer in CantorShell::updateList() when the CantorPart/Worksheet gets activated again. With this there is no need to introduce a new class and to touch the already existing code.
src/cantor.h | ||
---|---|---|
109 | why not to use a more simpler container QMap<KParts::ReadWritePart*, QStringList> and to store the names of the visible panels only? We don't need to track the invisible panels explicitly. If the name is not in the list, the panel is invisible. |
src/cantor.h | ||
---|---|---|
109 | When we disable all panels, names list will be empty. |
src/cantor.h | ||
---|---|---|
109 | When we create a new worksheet, there is not pointer/key for the Part in the map available yet. In this case we show all panels (default behaviour). For existing worksheets where the user closed all panels there will be a key in the map pointing to an empty QStringList. |