mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-08 10:15:53 -05:00
Add option to not reset seletion on any / all index type change
This commit is contained in:
parent
20cbe636df
commit
4ab88ea218
|
|
@ -369,10 +369,17 @@ void SceneItemSelectionWidget::SetShowAll(bool value)
|
|||
_hasAllEntry = value;
|
||||
}
|
||||
|
||||
void SceneItemSelectionWidget::SetShowAllSelectionType(AllSelectionType t)
|
||||
void SceneItemSelectionWidget::SetShowAllSelectionType(AllSelectionType t,
|
||||
bool resetSelection)
|
||||
{
|
||||
_allType = t;
|
||||
_sceneItems->setCurrentIndex(0);
|
||||
if (resetSelection) {
|
||||
_sceneItems->setCurrentIndex(0);
|
||||
} else {
|
||||
auto count = _idx->count() - 1;
|
||||
const QSignalBlocker b(_idx);
|
||||
SetupIdxSelection(count > 0 ? count : 1);
|
||||
}
|
||||
}
|
||||
|
||||
void SceneItemSelectionWidget::SceneChanged(const SceneSelection &s)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
void SetSceneItem(const SceneItemSelection &);
|
||||
void SetScene(const SceneSelection &);
|
||||
void SetShowAll(bool);
|
||||
void SetShowAllSelectionType(AllSelectionType t);
|
||||
void SetShowAllSelectionType(AllSelectionType t, bool resetSelection = true);
|
||||
signals:
|
||||
void SceneItemChanged(const SceneItemSelection &);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user