Skip to content

Commit 6992805

Browse files
committed
✨ minor fixes
1 parent 7a6b02a commit 6992805

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
33
set(PROJECT_NAME nttiny)
44

55
project(${PROJECT_NAME}
6-
VERSION 0.9.0
6+
VERSION 0.7.1
77
DESCRIPTION "OpenGL-based runtime scientific visualization library"
88
LANGUAGES CXX
99
)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ INCLUDES += -I${NTTINY_DIR}
4848
```
4949

5050
## Releases
51+
* `v0.7.1` [Jan 2023]:
52+
- fixed a bug which caused closing of all the legends when one of them was closed
53+
- saving color-symmetry parameter now in metadata
54+
- saving jumpover time
55+
- fixed a bug when jumpover=0 was crashing the program
56+
- minor bug fixes
5157
* `v0.7.0` [Oct 2022]:
5258
- full cmake support (readme updated)
5359
- option for symmetric colorbar

nttiny/vis.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ namespace nttiny {
207207
ImGui::SameLine();
208208
int jmp { this->m_sim->get_jumpover() };
209209
ImGui::DragInt("##skip", &jmp, 1, 1, 1000, "t += %d dt");
210-
this->m_sim->set_jumpover(jmp);
210+
this->m_sim->set_jumpover(std::max(jmp, 1));
211211
}
212212
ImGui::Separator();
213213
ImGui::Spacing();
@@ -231,8 +231,10 @@ namespace nttiny {
231231
ImVec2(-1, 2 * ImGui::GetFontSize()))) {
232232
this->m_save_video = !this->m_save_video;
233233
if (!this->m_save_video) {
234-
ImGui::InsertNotification(
235-
{ ImGuiToastType_Info, 3000, "Frames for video saved in `%s`", "bin/frames/" });
234+
ImGui::InsertNotification({ ImGuiToastType_Info,
235+
3000,
236+
"Frames for video saved in `%s`",
237+
this->m_sim->get_title() + "/frames/" });
236238
m_save_videoframe_count = 0;
237239
}
238240
}
@@ -352,6 +354,7 @@ namespace nttiny {
352354
this->SharedAxes.Y.Min = range[2];
353355
this->SharedAxes.Y.Max = range[3];
354356
this->m_collapsed_controls = toml::find_or<bool>(panels, "collapsed_controls", false);
357+
this->m_sim->set_jumpover(toml::find_or<int>(panels, "jumpover", 1));
355358
for (int i { 0 }; i < npanels; ++i) {
356359
const auto& plot = toml::find(panels, std::to_string(i));
357360
const auto type = toml::find<std::string>(plot, "type");
@@ -394,6 +397,7 @@ namespace nttiny {
394397
<< this->SharedAxes.Y.Min << ", " << this->SharedAxes.Y.Max << "]\n";
395398
export_file << "collapsed_controls = " << (this->m_collapsed_controls ? "true" : "false")
396399
<< "\n";
400+
export_file << "jumpover = " << this->m_sim->get_jumpover() << "\n";
397401
export_file.close();
398402
}
399403
ImGui::InsertNotification(

0 commit comments

Comments
 (0)