Fix Tape crash on Mac OS X.
This commit is contained in:
parent
188d7097e1
commit
c6e2819587
|
@ -1,3 +1,6 @@
|
|||
# Version 0.7.37 (unreleased)
|
||||
- Fix Tape crash on Mac OS X.
|
||||
|
||||
# Version 0.7.36 October 24, 2020
|
||||
- [#892] Show tooltip for piece node point.
|
||||
- [#894] Quick way to disable a passmark.
|
||||
|
|
|
@ -1719,6 +1719,20 @@ void MainWindow::ExportToCSVData(const QString &fileName, bool withHeader, int m
|
|||
csv.toCSV(fileName, error, withHeader, separator, QTextCodec::codecForMib(mib));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void MainWindow::ToolBarStyle(QToolBar *bar) const
|
||||
{
|
||||
MainWindowsNoGUI::ToolBarStyle(bar);
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
// Temporary fix issue with toolbar black background on mac with OpenGL render
|
||||
if (qApp->getSceneView() && qApp->getSceneView()->IsOpenGLRender())
|
||||
{
|
||||
bar->setStyle(QStyleFactory::create("fusion"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void MainWindow::ScaleChanged(qreal scale)
|
||||
{
|
||||
|
|
|
@ -111,6 +111,7 @@ protected:
|
|||
virtual void PrepareSceneList(PreviewQuatilty quality) override;
|
||||
virtual void ExportToCSVData(const QString &fileName, bool withHeader, int mib,
|
||||
const QChar &separator) final;
|
||||
virtual void ToolBarStyle(QToolBar *bar) const override;
|
||||
private slots:
|
||||
void ScaleChanged(qreal scale);
|
||||
void MouseMove(const QPointF &scenePos);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include "vabstractmainwindow.h"
|
||||
#include "../vpropertyexplorer/checkablemessagebox.h"
|
||||
#include "../vmisc/vabstractvalapplication.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "dialogs/dialogexporttocsv.h"
|
||||
|
@ -166,25 +166,11 @@ bool VAbstractMainWindow::ContinueFormatRewrite(const QString ¤tFormatVers
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractMainWindow::ToolBarStyle(QToolBar *bar)
|
||||
void VAbstractMainWindow::ToolBarStyle(QToolBar *bar) const
|
||||
{
|
||||
SCASSERT(bar != nullptr)
|
||||
if (qApp->Settings()->GetToolBarStyle())
|
||||
{
|
||||
bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
bar->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
}
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
// Temporary fix issue with toolbar black background on mac with OpenGL render
|
||||
if (qApp->getSceneView() && qApp->getSceneView()->IsOpenGLRender())
|
||||
{
|
||||
bar->setStyle(QStyleFactory::create("fusion"));
|
||||
}
|
||||
#endif
|
||||
qApp->Settings()->GetToolBarStyle() ? bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon)
|
||||
: bar->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -62,7 +62,7 @@ protected:
|
|||
QAction *m_separatorAct{nullptr};
|
||||
|
||||
bool ContinueFormatRewrite(const QString ¤tFormatVersion, const QString &maxFormatVersion);
|
||||
void ToolBarStyle(QToolBar *bar);
|
||||
virtual void ToolBarStyle(QToolBar *bar) const;
|
||||
|
||||
QString CSVFilePath();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user