mirror of
https://github.com/fralx/LimeReport.git
synced 2025-04-05 17:03:46 +03:00
^_^
This commit is contained in:
parent
71fa8d8ee1
commit
5824dbcebe
@ -762,9 +762,10 @@ void ReportDesignWindow::writeState()
|
|||||||
{
|
{
|
||||||
settings()->beginGroup("DesignerWindow");
|
settings()->beginGroup("DesignerWindow");
|
||||||
|
|
||||||
setDocWidgetsVisibility(true);
|
// setDocWidgetsVisibility(true);
|
||||||
|
|
||||||
m_editorsStates[m_editorTabType] = saveState();
|
m_editorsStates[m_editorTabType] = saveState();
|
||||||
|
settings()->setValue("MainWindowState", saveState());
|
||||||
settings()->setValue("PageEditorsState", m_editorsStates[ReportDesignWidget::Page]);
|
settings()->setValue("PageEditorsState", m_editorsStates[ReportDesignWidget::Page]);
|
||||||
settings()->setValue("DialogEditorsState", m_editorsStates[ReportDesignWidget::Dialog]);
|
settings()->setValue("DialogEditorsState", m_editorsStates[ReportDesignWidget::Dialog]);
|
||||||
settings()->setValue("ScriptEditorsState", m_editorsStates[ReportDesignWidget::Script]);
|
settings()->setValue("ScriptEditorsState", m_editorsStates[ReportDesignWidget::Script]);
|
||||||
@ -846,6 +847,7 @@ void ReportDesignWindow::addRecentFile(const QString &fileName)
|
|||||||
|
|
||||||
void ReportDesignWindow::restoreSetting()
|
void ReportDesignWindow::restoreSetting()
|
||||||
{
|
{
|
||||||
|
qDebug() << "limereport restoreSetting" << m_ownedSettings;
|
||||||
settings()->beginGroup("DesignerWindow");
|
settings()->beginGroup("DesignerWindow");
|
||||||
QVariant v = settings()->value("Geometry");
|
QVariant v = settings()->value("Geometry");
|
||||||
if (v.isValid()){
|
if (v.isValid()){
|
||||||
@ -868,6 +870,9 @@ void ReportDesignWindow::restoreSetting()
|
|||||||
resize(screenWidth * 0.8, screenHeight * 0.8);
|
resize(screenWidth * 0.8, screenHeight * 0.8);
|
||||||
move(x, y);
|
move(x, y);
|
||||||
}
|
}
|
||||||
|
auto s = settings()->value("MainWindowState").toByteArray();
|
||||||
|
if(!s.isEmpty())
|
||||||
|
restoreState(s);
|
||||||
v = settings()->value("PageEditorsState");
|
v = settings()->value("PageEditorsState");
|
||||||
if (v.isValid()){
|
if (v.isValid()){
|
||||||
m_editorsStates[ReportDesignWidget::Page] = v.toByteArray();
|
m_editorsStates[ReportDesignWidget::Page] = v.toByteArray();
|
||||||
@ -986,6 +991,7 @@ QSettings*ReportDesignWindow::settings()
|
|||||||
|
|
||||||
void LimeReport::ReportDesignWindow::saveSettings()
|
void LimeReport::ReportDesignWindow::saveSettings()
|
||||||
{
|
{
|
||||||
|
qDebug() << "limereport saveSettings" << m_ownedSettings;
|
||||||
writeState();
|
writeState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1410,7 +1416,9 @@ void ReportDesignWindow::showDefaultToolBars(){
|
|||||||
|
|
||||||
void ReportDesignWindow::showDefaultEditors(){
|
void ReportDesignWindow::showDefaultEditors(){
|
||||||
foreach (QDockWidget* w, m_pageEditors) {
|
foreach (QDockWidget* w, m_pageEditors) {
|
||||||
w->setVisible(m_editorTabType != ReportDesignWidget::Dialog);
|
w->setVisible(m_editorTabType != ReportDesignWidget::Dialog &&
|
||||||
|
w->objectName() != "scriptDoc" &&
|
||||||
|
w->objectName() != "structureDoc");
|
||||||
}
|
}
|
||||||
#ifdef HAVE_QTDESIGNER_INTEGRATION
|
#ifdef HAVE_QTDESIGNER_INTEGRATION
|
||||||
foreach (QDockWidget* w, m_dialogEditors) {
|
foreach (QDockWidget* w, m_dialogEditors) {
|
||||||
|
Loading…
Reference in New Issue
Block a user