Skip to content

Commit

Permalink
Fix clearing selection
Browse files Browse the repository at this point in the history
clearFrameData was a hack not really clearing the selection.
This is no longer required as we now support decorations without
selection.
  • Loading branch information
pasnox committed Feb 21, 2017
1 parent d2c3a7d commit 86dff2e
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 29 deletions.
1 change: 0 additions & 1 deletion common/remoteviewinterface.h
Expand Up @@ -81,7 +81,6 @@ public slots:
void reset();
void elementsAtReceived(const GammaRay::ObjectIds &ids, int bestCandidate);
void frameUpdated(const GammaRay::RemoteViewFrame &frame);
void requestClearFrameData();

private:
QString m_name;
Expand Down
7 changes: 0 additions & 7 deletions core/remoteviewserver.cpp
Expand Up @@ -78,13 +78,6 @@ void RemoteViewServer::resetView()
emit reset();
}


void RemoteViewServer::clearFrameData()
{
if (isActive())
emit requestClearFrameData();
}

bool RemoteViewServer::isActive() const
{
return m_clientActive;
Expand Down
3 changes: 0 additions & 3 deletions core/remoteviewserver.h
Expand Up @@ -61,9 +61,6 @@ class GAMMARAY_CORE_EXPORT RemoteViewServer : public RemoteViewInterface
/// resets the client view if the window selection changed
void resetView();

/// clear the client current frame data
void clearFrameData();

/// returns @c true if there is a client displaying our content
bool isActive() const;

Expand Down
8 changes: 1 addition & 7 deletions plugins/quickinspector/quickinspector.cpp
Expand Up @@ -541,13 +541,7 @@ void QuickInspector::checkServerSideDecorations()

void QuickInspector::itemSelectionChanged(const QItemSelection &selection)
{
if (selection.isEmpty()) {
m_overlay->placeOn(ItemOrLayoutFacade());
m_remoteView->clearFrameData();
return;
}

const QModelIndex index = selection.first().topLeft();
const QModelIndex index = selection.value(0).topLeft();
m_currentItem = index.data(ObjectModel::ObjectRole).value<QQuickItem *>();
m_itemPropertyController->setObject(m_currentItem);

Expand Down
10 changes: 0 additions & 10 deletions ui/remoteviewwidget.cpp
Expand Up @@ -117,7 +117,6 @@ void RemoteViewWidget::setName(const QString &name)
connect(m_interface, SIGNAL(elementsAtReceived(GammaRay::ObjectIds,int)), this, SLOT(elementsAtReceived(GammaRay::ObjectIds,int)));
connect(m_interface, SIGNAL(frameUpdated(GammaRay::RemoteViewFrame)), this,
SLOT(frameUpdated(GammaRay::RemoteViewFrame)));
connect(m_interface, SIGNAL(requestClearFrameData()), this, SLOT(clearFrameData()));
m_interface->clientViewUpdated();
}

Expand Down Expand Up @@ -243,15 +242,6 @@ void RemoteViewWidget::frameUpdated(const RemoteViewFrame &frame)
QMetaObject::invokeMethod(m_interface, "clientViewUpdated", Qt::QueuedConnection);
}

void RemoteViewWidget::clearFrameData()
{
if (!m_frame.isValid())
return;
auto frame = m_frame;
frame.setData(QVariant());
frameUpdated(frame);
}

int RemoteViewWidget::invisibleMask() const
{
return m_invisibleMask;
Expand Down
1 change: 0 additions & 1 deletion ui/remoteviewwidget.h
Expand Up @@ -193,7 +193,6 @@ private slots:
void pickElementId(const QModelIndex &index);
void elementsAtReceived(const GammaRay::ObjectIds &ids, int bestCandidate);
void frameUpdated(const GammaRay::RemoteViewFrame &frame);
void clearFrameData();

private:
RemoteViewFrame m_frame;
Expand Down

0 comments on commit 86dff2e

Please sign in to comment.