mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
As creation of a font is time consuming, create one application font instance
p4#: 21338
This commit is contained in:
@@ -135,6 +135,10 @@ RiaApplication::RiaApplication(int& argc, char** argv)
|
||||
//m_startupDefaultDirectory += "/My Documents/";
|
||||
#endif
|
||||
setDefaultFileDialogDirectory("MULTICASEIMPORT", "/");
|
||||
|
||||
// The creation of a font is time consuming, so make sure you really need your own font
|
||||
// instead of using the application font
|
||||
m_standardFont = new cvf::FixedAtlasFont(cvf::FixedAtlasFont::STANDARD);
|
||||
}
|
||||
|
||||
|
||||
@@ -1422,3 +1426,16 @@ bool RiaApplication::addEclipseCases(const QStringList& fileNames)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Font* RiaApplication::standardFont()
|
||||
{
|
||||
CVF_ASSERT(m_standardFont.notNull());
|
||||
|
||||
// The creation of a font is time consuming, so make sure you really need your own font
|
||||
// instead of using the application font
|
||||
|
||||
return m_standardFont.p();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user