Skip to content
Snippets Groups Projects
Commit 42f64e14 authored by SeeLook's avatar SeeLook :musical_note:
Browse files

Missing destructor, some cleaning

parent 4700422b
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,13 @@ TbgPixmap::TbgPixmap() :
m_instance = this;
}
TbgPixmap::~TbgPixmap()
{
m_instance = 0;
}
void TbgPixmap::update(const QSize& windowSize, int instr, int guitarHeight, int XIIfretXpos, int fingerboardX, bool rightHanded) {
if (windowSize != m_windowSize || instr != m_instr || m_rightHanded != rightHanded) {
Einstrument in = static_cast<Einstrument>(instr);
......
......@@ -37,6 +37,7 @@ class TbgPixmap : public QPixmap
public:
TbgPixmap();
~TbgPixmap();
static TbgPixmap* instance() { return m_instance; }
......
......@@ -85,8 +85,7 @@ TmainScore::TmainScore(QMainWindow* mw, QWidget* parent) :
createNoteName();
isExamExecuting(false);
setNote(0, Tnote()); // To display fake empty note properly
// setStyleSheet(QString());
// setStyleSheet(QLatin1String("border-radius: 10px;")); // reset style sheet - we are using paint event here
viewport()->setStyleSheet(QStringLiteral("border-radius: 10px;"));
setBGcolor(palette().base().color());
}
......@@ -643,7 +642,6 @@ void TmainScore::paintEvent(QPaintEvent* event) {
if (!BG_PIX->isNull() && event->rect().bottomRight().x() >= BG_PIX->globalPos().x()) {
painter.drawPixmap(BG_PIX->globalPos().x() , BG_PIX->globalPos().y() - y(), *BG_PIX);
}
painter.setBrush(m_bgColor);
painter.setPen(Qt::NoPen);
if (event->rect().x() <= ROUNDNESS || painter.viewport().width() - (event->rect().x() + event->rect().width()) <= ROUNDNESS)
......@@ -890,9 +888,6 @@ void TmainScore::resizeEvent(QResizeEvent* event) {
return;
setBarsIconSize();
performScordatureSet(); // To keep scordature size up to date with score size
// setBgPixmapPos(m_bgPixPos);
// QPointF zero = mapToScene(QPoint(0, 0));
// m_bgItem->setRect(zero.x(), zero.y(), width(), height());
}
......
......@@ -43,7 +43,6 @@ TmultiScore::TmultiScore(QMainWindow* mw, QWidget* parent) :
m_selectReadOnly(false), m_isDisabled(false)
{
setObjectName("m_mainScore");
setStyleSheet("TsimpleScore#m_mainScore { background: transparent }");
setContentsMargins(2, 2, 2, 2);
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
staff()->setZValue(11); // to be above next staves - TnoteControl requires it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment