diff --git a/src/main_window.cpp b/src/main_window.cpp index 2967ed4..0f8c661 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -96,8 +96,14 @@ void AC_MainWindow::createControls() { filters = new QComboBox(this); filters->setGeometry(10, 105, 380, 30); - for(int i = 0; i < ac::draw_max-5; ++i) { - filters->addItem(ac::draw_strings[i].c_str()); + std::vector fnames; + for(int i = 0; i < ac::draw_max-5; ++i) + fnames.push_back(ac::draw_strings[i].c_str()); + + std::sort(fnames.begin(), fnames.end()); + + for(unsigned long i = 0; i < fnames.size(); ++i) { + filters->addItem(fnames[i].c_str()); } for(int i = 0; filter_names[i] != 0; ++i) { diff --git a/src/qtheaders.h b/src/qtheaders.h index ab9cf4c..bc5875e 100644 --- a/src/qtheaders.h +++ b/src/qtheaders.h @@ -56,6 +56,8 @@ #include"fractal.h" #include #include +#include +#include void init_plugins(); void draw_plugin(cv::Mat &frame, int filter);