/[svn]/qsampler/trunk/src/qsamplerOptions.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerOptions.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3557 by capela, Thu Aug 15 09:09:21 2019 UTC revision 3558 by capela, Wed Aug 21 17:10:11 2019 UTC
# Line 27  Line 27 
27  #include <QTextStream>  #include <QTextStream>
28  #include <QComboBox>  #include <QComboBox>
29    
30    #include <QApplication>
31    #include <QDesktopWidget>
32    
33  #include <lscp/client.h>  #include <lscp/client.h>
34    
35  #ifdef CONFIG_LIBGIG  #ifdef CONFIG_LIBGIG
# Line 377  void Options::loadWidgetGeometry ( QWidg Line 380  void Options::loadWidgetGeometry ( QWidg
380          #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)          #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
381                  const QByteArray& geometry                  const QByteArray& geometry
382                          = m_settings.value("/geometry").toByteArray();                          = m_settings.value("/geometry").toByteArray();
383                  if (!geometry.isEmpty())                  if (geometry.isEmpty()) {
384                            QWidget *pParent = pWidget->parentWidget();
385                            if (pParent)
386                                    pParent = pParent->window();
387                            if (pParent == nullptr)
388                                    pParent = QApplication::desktop();
389                            if (pParent) {
390                                    QRect wrect(pWidget->geometry());
391                                    wrect.moveCenter(pParent->geometry().center());
392                                    pWidget->move(wrect.topLeft());
393                            }
394                    } else {
395                          pWidget->restoreGeometry(geometry);                          pWidget->restoreGeometry(geometry);
396                    }
397          #else//--LOAD_OLD_GEOMETRY          #else//--LOAD_OLD_GEOMETRY
398                  QPoint wpos;                  QPoint wpos;
399                  QSize  wsize;                  QSize  wsize;

Legend:
Removed from v.3557  
changed lines
  Added in v.3558

  ViewVC Help
Powered by ViewVC