Skip to content

Commit

Permalink
Fix progress bad reset!
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Jan 26, 2024
1 parent 83e3818 commit c0820f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cli/ProgressMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ProgressMeter::ProgressMeter()
{
hide = false;
simpleMode = false;
simpleMode = true;
progress_total = progress = 0;
progress_title = "";
}
Expand All @@ -20,7 +20,7 @@ void ProgressMeter::update(const std::string & newTitle, int totalProgressTicks)
progress_title = newTitle;
progress = 0;
progress_total = totalProgressTicks;
if (simpleMode && !hide)
if (simpleMode && !hide && !newTitle.empty())
{
print_log(newTitle + "\n");
}
Expand Down
2 changes: 0 additions & 2 deletions src/editor/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ Renderer::Renderer()

gui->init();

g_progress.simpleMode = true;

pointEntRenderer = new PointEntRenderer(NULL);

reloading = true;
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,8 @@ int main(int argc, char* argv[])
g_verbose = true;
}

g_progress.simpleMode = false;

if (cli.command == "exportobj")
{
int scale = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <unordered_set>

bool DebugKeyPressed = false;
ProgressMeter g_progress;
ProgressMeter g_progress = {};
int g_render_flags;
std::vector<std::string> g_log_buffer;
std::vector<unsigned short> g_color_buffer;
Expand Down

0 comments on commit c0820f4

Please sign in to comment.