File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -1634,6 +1634,12 @@ void MockGLEngine::configureImGui() {
16341634 }
16351635
16361636 ImGuiIO& io = ImGui::GetIO ();
1637+
1638+ // if polyscope's prefs file is disabled, disable imgui's ini file too
1639+ if (!options::usePrefsFile) {
1640+ io.IniFilename = nullptr ;
1641+ }
1642+
16371643 io.Fonts ->Clear ();
16381644 io.Fonts ->Build ();
16391645}
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ void GLEngineEGL::initialize() {
257257 info (0 , ss.str ());
258258 }
259259
260- if (options::uiScale < 0 ) { // only set from system if the value is -1, meaning not set yet
260+ if (options::uiScale < 0 ) { // only set from system if the value is -1, meaning not set yet
261261 options::uiScale = 1 .;
262262 }
263263
@@ -437,7 +437,7 @@ void GLEngineEGL::initializeImGui() {
437437 // functions
438438
439439 ImGui::CreateContext ();
440- ImPlot::CreateContext ();
440+ ImPlot::CreateContext ();
441441 configureImGui ();
442442}
443443
@@ -450,6 +450,12 @@ void GLEngineEGL::configureImGui() {
450450 }
451451
452452 ImGuiIO& io = ImGui::GetIO ();
453+
454+ // if polyscope's prefs file is disabled, disable imgui's ini file too
455+ if (!options::usePrefsFile) {
456+ io.IniFilename = nullptr ;
457+ }
458+
453459 io.Fonts ->Clear ();
454460 io.Fonts ->Build ();
455461}
Original file line number Diff line number Diff line change @@ -179,9 +179,15 @@ void GLEngineGLFW::configureImGui() {
179179 exception (" uiScale is < 0. Perhaps it wasn't initialized?" );
180180 }
181181
182+ ImGuiIO& io = ImGui::GetIO ();
183+
184+ // if polyscope's prefs file is disabled, disable imgui's ini file too
185+ if (!options::usePrefsFile) {
186+ io.IniFilename = nullptr ;
187+ }
188+
182189 if (options::prepareImGuiFontsCallback) {
183190
184- ImGuiIO& io = ImGui::GetIO ();
185191 io.Fonts ->Clear ();
186192
187193 // these are necessary if different fonts are loaded in the callback
You can’t perform that action at this time.
0 commit comments