fixed favorites

This commit is contained in:
Jared Bruni
2021-10-19 21:35:30 -07:00
parent de0c379c5c
commit c1a3cd70ff
3 changed files with 14 additions and 0 deletions

View File

@@ -151,6 +151,11 @@ void Playback::setVector(std::vector<FilterValue> v) {
mutex.unlock();
}
void Playback::setFilterMapEx(std::unordered_map<std::string, FilterValue> f) {
filter_map_ex_set = f;
setFilterMap = true;
}
unsigned long Playback::calcMem() {
mutex.lock();
unsigned long calc = ac::calculateMemory();
@@ -413,6 +418,11 @@ void Playback::run() {
color_replace_image = chroma_image.clone();
chroma_image_set = false;
}
if(setFilterMap) {
filter_map_ex = filter_map_ex_set;
setFilterMap = false;
}
mutex.unlock();
cv::Mat temp_frame;

View File

@@ -57,6 +57,8 @@ private:
std::atomic<int> fps_delay;
std::vector<std::string> draw_strings;
std::unordered_map<std::string, FilterValue> filter_map_ex;
bool setFilterMap = false;
std::unordered_map<std::string, FilterValue> filter_map_ex_set;
public:
Playback(QObject *parent = 0);
~Playback();
@@ -76,6 +78,7 @@ public:
void setColorMap(int c);
void setPngPath(std::string path);
void clearImage();
void setFilterMapEx(std::unordered_map<std::string, FilterValue> f);
void Play();
void Stop();
void Release();

View File

@@ -54,6 +54,7 @@ void DefineWindow::setFilterName() {
filter_map[fn].index = 0;
filter_map[fn].filter = filter_map[ft].filter;
filter_map[fn].subfilter = -1;
main_window->playback->setFilterMapEx(filter_map);
main_window->resetMenu();
def_list->addItem(real_final_name.c_str());
def_newname->setText("");