Placeholders now receive LayoutWidget instead of the derived class
This commit is contained in:
@@ -88,7 +88,7 @@ void Position::removePlaceholders()
|
||||
m_placeholders.clear();
|
||||
}
|
||||
|
||||
void Position::removePlaceholders(const MultiSplitter *ms)
|
||||
void Position::removePlaceholders(const LayoutWidget *ms)
|
||||
{
|
||||
m_placeholders.erase(std::remove_if(m_placeholders.begin(), m_placeholders.end(), [ms] (const std::unique_ptr<ItemRef> &itemref) {
|
||||
return itemref->item->hostWidget() == *ms;
|
||||
|
||||
@@ -36,7 +36,7 @@ class Item;
|
||||
|
||||
namespace KDDockWidgets {
|
||||
|
||||
class MultiSplitter;
|
||||
class LayoutWidget;
|
||||
|
||||
// Just a RAII class so we don't forget to unref
|
||||
struct ItemRef
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
const std::vector<std::unique_ptr<ItemRef>>& placeholders() const { return m_placeholders; }
|
||||
|
||||
///@brief Removes the placeholders that belong to this multisplitter
|
||||
void removePlaceholders(const MultiSplitter *);
|
||||
void removePlaceholders(const LayoutWidget *);
|
||||
|
||||
///@brief Removes the placeholders that reference a FloatingWindow
|
||||
void removeNonMainWindowPlaceholders();
|
||||
@@ -176,7 +176,8 @@ struct LastPositions
|
||||
lastPosition->removePlaceholders();
|
||||
}
|
||||
|
||||
void removePlaceholders(const MultiSplitter *hostWidget) const {
|
||||
void removePlaceholders(const LayoutWidget *hostWidget) const
|
||||
{
|
||||
lastPosition->removePlaceholders(hostWidget);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user