Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Miguel Lopez
Krita
Commits
20c5907f
Commit
20c5907f
authored
May 02, 2014
by
Friedrich W. H. Kossebau
Browse files
Fix KisDlgFilter to always show the name of the currently selected filter
REVIEW: 117949 Thanks boud for review
parent
034f6bee
Changes
2
Hide whitespace changes
Inline
Side-by-side
krita/ui/dialogs/kis_dlg_filter.cpp
View file @
20c5907f
...
...
@@ -78,7 +78,7 @@ KisDlgFilter::KisDlgFilter(KisView2 *view, KisNodeSP node, KisFilterManager *fil
connect
(
d
->
uiFilterDialog
.
buttonBox
,
SIGNAL
(
rejected
()),
SLOT
(
reject
()));
connect
(
d
->
uiFilterDialog
.
checkBoxPreview
,
SIGNAL
(
stateChanged
(
int
)),
SLOT
(
previewCheckBoxChange
(
int
)));
connect
(
d
->
uiFilterDialog
.
filterSelection
,
SIGNAL
(
configurationChanged
()),
SLOT
(
updatePreview
()));
connect
(
d
->
uiFilterDialog
.
filterSelection
,
SIGNAL
(
configurationChanged
()),
SLOT
(
filterSelectionChanged
()));
connect
(
this
,
SIGNAL
(
finished
(
int
)),
SLOT
(
close
()));
KConfigGroup
group
(
KGlobal
::
config
(),
"filterdialog"
);
...
...
@@ -93,12 +93,17 @@ KisDlgFilter::~KisDlgFilter()
void
KisDlgFilter
::
setFilter
(
KisFilterSP
f
)
{
Q_ASSERT
(
f
);
set
Window
Title
(
f
->
name
()
);
set
Dialog
Title
(
f
);
d
->
uiFilterDialog
.
filterSelection
->
setFilter
(
f
);
d
->
uiFilterDialog
.
pushButtonCreateMaskEffect
->
setEnabled
(
f
->
supportsAdjustmentLayers
());
updatePreview
();
}
void
KisDlgFilter
::
setDialogTitle
(
KisFilterSP
filter
)
{
setWindowTitle
(
filter
.
isNull
()
?
i18n
(
"Filter"
)
:
i18n
(
"Filter: %1"
,
filter
->
name
()));
}
void
KisDlgFilter
::
startApplyingFilter
(
KisSafeFilterConfigurationSP
config
)
{
if
(
!
d
->
uiFilterDialog
.
filterSelection
->
configuration
())
return
;
...
...
@@ -175,6 +180,15 @@ void KisDlgFilter::previewCheckBoxChange(int state)
group
.
config
()
->
sync
();
}
void
KisDlgFilter
::
filterSelectionChanged
()
{
KisFilterSP
filter
=
d
->
uiFilterDialog
.
filterSelection
->
currentFilter
();
setDialogTitle
(
filter
);
d
->
uiFilterDialog
.
pushButtonCreateMaskEffect
->
setEnabled
(
filter
.
isNull
()
?
false
:
filter
->
supportsAdjustmentLayers
());
updatePreview
();
}
void
KisDlgFilter
::
resizeEvent
(
QResizeEvent
*
event
)
{
QDialog
::
resizeEvent
(
event
);
...
...
krita/ui/dialogs/kis_dlg_filter.h
View file @
20c5907f
...
...
@@ -42,10 +42,6 @@ public:
void
setFilter
(
KisFilterSP
f
);
public
slots
:
void
updatePreview
();
protected
slots
:
void
apply
();
...
...
@@ -56,10 +52,14 @@ protected slots:
void
previewCheckBoxChange
(
int
state
);
void
filterSelectionChanged
();
virtual
void
resizeEvent
(
QResizeEvent
*
);
private:
void
startApplyingFilter
(
KisSafeFilterConfigurationSP
config
);
void
setDialogTitle
(
KisFilterSP
f
);
void
updatePreview
();
private:
struct
Private
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment