mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-25 15:34:48 -05:00
hide guide frames when switching to a different tab (#75)
This commit is contained in:
parent
ba15e6812f
commit
4af7540497
|
|
@ -431,6 +431,13 @@ void AdvSceneSwitcher::on_tabMoved(int from, int to)
|
|||
std::swap(switcher->tabOrder[from], switcher->tabOrder[to]);
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::on_tabWidget_currentChanged(int index)
|
||||
{
|
||||
switcher->showFrame = false;
|
||||
clearFrames(ui->screenRegionSwitches);
|
||||
SetShowFrames();
|
||||
}
|
||||
|
||||
void SwitcherData::saveGeneralSettings(obs_data_t *obj)
|
||||
{
|
||||
obs_data_set_int(obj, "interval", switcher->interval);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ public:
|
|||
void SetStarted();
|
||||
void SetStopped();
|
||||
|
||||
void SetShowFrames();
|
||||
void SetHideFrames();
|
||||
void clearFrames(QListWidget *list);
|
||||
|
||||
int PauseScenesFindByData(const QString &scene);
|
||||
int PauseWindowsFindByData(const QString &window);
|
||||
int IgnoreWindowsFindByData(const QString &window);
|
||||
|
|
@ -87,6 +91,7 @@ public slots:
|
|||
void on_checkInterval_valueChanged(int value);
|
||||
void on_toggleStartButton_clicked();
|
||||
void on_tabMoved(int from, int to);
|
||||
void on_tabWidget_currentChanged(int index);
|
||||
|
||||
void on_screenRegionSwitches_currentRowChanged(int idx);
|
||||
void on_showFrame_clicked();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
void clearFrames(QListWidget *list)
|
||||
void AdvSceneSwitcher::clearFrames(QListWidget *list)
|
||||
{
|
||||
for (int i = 0; i < list->count(); ++i) {
|
||||
ScreenRegionWidget *sw =
|
||||
|
|
@ -25,15 +25,25 @@ void showCurrentFrame(QListWidget *list)
|
|||
sw->showFrame();
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::SetShowFrames()
|
||||
{
|
||||
ui->showFrame->setText("Show guide frames");
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::SetHideFrames()
|
||||
{
|
||||
ui->showFrame->setText("Hide guide frames");
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::on_showFrame_clicked()
|
||||
{
|
||||
switcher->showFrame = !switcher->showFrame;
|
||||
|
||||
if (switcher->showFrame) {
|
||||
ui->showFrame->setText("Hide guide frames");
|
||||
SetHideFrames();
|
||||
showCurrentFrame(ui->screenRegionSwitches);
|
||||
} else {
|
||||
ui->showFrame->setText("Show guide frames");
|
||||
SetShowFrames();
|
||||
clearFrames(ui->screenRegionSwitches);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user