Skip to content

Commit

Permalink
Simplify updating item style
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Aug 6, 2017
1 parent 22271b3 commit 4636be0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions plugins/itemtext/itemtext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ ItemText::ItemText(const QString &text, bool isRichText, int maxLines, int maxim

m_textDocument.setDocumentMargin(0);

setProperty("CopyQ_no_style", isRichText);

if (maxLines > 0) {
QTextBlock block = m_textDocument.findBlockByLineNumber(maxLines);
if (block.isValid()) {
Expand Down
2 changes: 0 additions & 2 deletions plugins/itemweb/itemweb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ ItemWeb::ItemWeb(const QString &html, int maximumHeight, bool preview, QWidget *
page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
connect( page(), SIGNAL(linkClicked(QUrl)), SLOT(onLinkClicked(QUrl)) );

setProperty("CopyQ_no_style", true);

// Set some remote URL as base URL so we can include remote scripts.
setHtml(html, QUrl("http://example.com/"));
}
Expand Down
2 changes: 0 additions & 2 deletions src/item/itemdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ void ItemDelegate::setIndexWidget(const QModelIndex &index, ItemWidget *w)
void ItemDelegate::setWidgetSelected(QWidget *ww, bool selected)
{
ww->setProperty(propertySelectedItem, selected);
if ( ww->property("CopyQ_no_style").toBool() )
return;

QStyle *style = m_view->style();
ww->setStyle(style);
Expand Down

0 comments on commit 4636be0

Please sign in to comment.