Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Krita
Commits
eda2d6fb
Commit
eda2d6fb
authored
Sep 28, 2022
by
Mathias Wein
Browse files
Revert "Make sure that thumbnails are generated from exactBounds()"
This reverts commit
9b7318c1
.
BUG:459510
parent
a4a2d5bc
Pipeline
#238074
passed with stage
in 51 minutes and 21 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
libs/image/kis_paint_device.cc
View file @
eda2d6fb
...
...
@@ -1832,7 +1832,7 @@ QImage KisPaintDevice::createThumbnail(qint32 maxw, qint32 maxh,
qreal
oversample
,
KoColorConversionTransformation
::
Intent
renderingIntent
,
KoColorConversionTransformation
::
ConversionFlags
conversionFlags
)
{
const
QRect
deviceExtent
=
ex
actBounds
();
const
QRect
deviceExtent
=
ex
tent
();
const
QSize
thumbnailSize
=
deviceExtent
.
size
().
scaled
(
maxw
,
maxh
,
aspectRatioMode
);
return
createThumbnail
(
thumbnailSize
.
width
(),
thumbnailSize
.
height
(),
oversample
,
renderingIntent
,
conversionFlags
);
...
...
plugins/dockers/layerdocker/LayerBox.cpp
View file @
eda2d6fb
...
...
@@ -159,7 +159,7 @@ LayerBox::LayerBox()
:
QDockWidget
(
i18n
(
"Layers"
))
,
m_canvas
(
0
)
,
m_wdgLayerBox
(
new
Ui_WdgLayerBox
)
,
m_thumbnailCompressor
(
2
00
,
KisSignalCompressor
::
FIRST_INACTIVE
)
,
m_thumbnailCompressor
(
5
00
,
KisSignalCompressor
::
FIRST_INACTIVE
)
,
m_colorLabelCompressor
(
500
,
KisSignalCompressor
::
FIRST_INACTIVE
)
,
m_thumbnailSizeCompressor
(
100
,
KisSignalCompressor
::
FIRST_INACTIVE
)
,
m_treeIndentationCompressor
(
100
,
KisSignalCompressor
::
FIRST_INACTIVE
)
...
...
@@ -306,8 +306,7 @@ LayerBox::LayerBox()
setEnabled
(
false
);
connect
(
&
m_idleWatcher
,
SIGNAL
(
startedIdleMode
()),
SLOT
(
updateDirtyThumbnails
()));
connect
(
&
m_thumbnailCompressor
,
SIGNAL
(
timeout
()),
SLOT
(
notifyThumbnailDirty
()));
connect
(
&
m_thumbnailCompressor
,
SIGNAL
(
timeout
()),
SLOT
(
updateThumbnail
()));
connect
(
&
m_colorLabelCompressor
,
SIGNAL
(
timeout
()),
SLOT
(
updateAvailableLabels
()));
...
...
@@ -542,7 +541,6 @@ void LayerBox::setCanvas(KoCanvasBase *canvas)
disconnect
(
m_nodeManager
,
0
,
this
,
0
);
disconnect
(
m_nodeModel
,
0
,
m_nodeManager
,
0
);
m_nodeManager
->
slotSetSelectedNodes
(
KisNodeList
());
m_idleWatcher
.
setTrackedImages
({});
}
m_canvas
=
dynamic_cast
<
KisCanvas2
*>
(
canvas
);
...
...
@@ -551,7 +549,6 @@ void LayerBox::setCanvas(KoCanvasBase *canvas)
m_image
=
m_canvas
->
image
();
emit
imageChanged
();
connect
(
m_image
,
SIGNAL
(
sigImageUpdated
(
QRect
)),
&
m_thumbnailCompressor
,
SLOT
(
start
()));
m_idleWatcher
.
setTrackedImage
(
m_image
);
KisDocument
*
doc
=
static_cast
<
KisDocument
*>
(
m_canvas
->
imageView
()
->
document
());
KisShapeController
*
kritaShapeController
=
...
...
@@ -1099,17 +1096,9 @@ void LayerBox::slotNodeManagerChangedSelection(const KisNodeList &nodes)
model
->
select
(
selection
,
QItemSelectionModel
::
ClearAndSelect
|
QItemSelectionModel
::
Rows
);
}
void
LayerBox
::
notify
Thumbnail
Dirty
()
void
LayerBox
::
update
Thumbnail
()
{
m_dirtyThumbnailNodes
.
insert
(
m_wdgLayerBox
->
listLayers
->
currentIndex
());
}
void
LayerBox
::
updateDirtyThumbnails
()
{
Q_FOREACH
(
const
QModelIndex
&
index
,
m_dirtyThumbnailNodes
)
{
m_wdgLayerBox
->
listLayers
->
updateNode
(
index
);
}
m_dirtyThumbnailNodes
.
clear
();
m_wdgLayerBox
->
listLayers
->
updateNode
(
m_wdgLayerBox
->
listLayers
->
currentIndex
());
}
void
LayerBox
::
slotRenameCurrentNode
()
...
...
plugins/dockers/layerdocker/LayerBox.h
View file @
eda2d6fb
...
...
@@ -34,7 +34,6 @@
#include
<QCheckBox>
#include
<kis_slider_spin_box.h>
#include
<QComboBox>
#include
<kis_idle_watcher.h>
class
QModelIndex
;
...
...
@@ -124,6 +123,7 @@ private Q_SLOTS:
void
slotLayerOpMenuOpened
();
void
slotLayerOpMenuClosed
();
void
updateThumbnail
();
void
updateAvailableLabels
();
void
updateLayerFiltering
();
...
...
@@ -135,8 +135,6 @@ private Q_SLOTS:
void
slotImageTimeChanged
(
int
time
);
void
slotForgetAboutSavedNodeBeforeEditSelectionMode
();
void
notifyThumbnailDirty
();
void
updateDirtyThumbnails
();
Q_SIGNALS:
void
imageChanged
();
...
...
@@ -187,8 +185,6 @@ private:
KisNodeWSP
m_savedNodeBeforeEditSelectionMode
;
bool
m_blockOpacityUpdate
{
false
};
KisSignalAutoConnectionsStore
m_activeNodeConnections
;
QSet
<
QModelIndex
>
m_dirtyThumbnailNodes
;
KisIdleWatcher
m_idleWatcher
;
};
class
LayerBoxFactory
:
public
KoDockFactoryBase
...
...
Mathias Wein
@mwein
mentioned in commit
a943b8c7
·
Nov 05, 2022
mentioned in commit
a943b8c7
mentioned in commit a943b8c708f8a1c921940aea42829c94476f1cbd
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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