Merge pull request #1267 from LittleHuba/quickfix_build

Quickfix build
presentation
Ulrich Huber 7 years ago committed by GitHub
commit e06ea1aa29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/gui/XournalppCursor.cpp
  2. 10
      src/gui/XournalppCursor.h

@ -458,9 +458,10 @@ GdkCursor* XournalppCursor::createHighlighterOrPenCursor(int size, double alpha)
int width = size;
//create a hash of variables so we notice if one changes despite being the same cursor type:
ulong flavour = (big?1:0) | (bright?2:0) | (ulong)(64*alpha)<<2 | (ulong)size<<9 | (ulong)rgb<<14;
gulong flavour =
(big ? 1 : 0) | (bright ? 2 : 0) | (gulong)(64 * alpha) << 2 | (gulong) size << 9 | (gulong) rgb << 14;
if (flavour != this->currentCursorFlavour)
{
g_warning("Not the same Flavour!");
@ -582,9 +583,9 @@ GdkCursor* XournalppCursor::createCustomDrawDirCursor(int size, bool shift, bool
XOJ_CHECK_TYPE(XournalppCursor);
bool big = control->getSettings()->isShowBigCursor();
bool bright = control->getSettings()->isHighlightPosition();
int newCursorID = CRSR_DRAWDIRNONE + (shift?1:0) + (ctrl?2:0);
ulong flavour = (big?1:0) | (bright?2:0) | (ulong)size<<2; // hash of variables for comparison only
int newCursorID = CRSR_DRAWDIRNONE + (shift ? 1 : 0) + (ctrl ? 2 : 0);
gulong flavour = (big ? 1 : 0) | (bright ? 2 : 0) | (gulong) size << 2; // hash of variables for comparison only
if (newCursorID == this->currentCursor && flavour == this->currentCursorFlavour) return NULL;
this->currentCursor = newCursorID;

@ -63,9 +63,9 @@ private:
// One shot drawDir custom cursor -drawn instead of pen/stylus then cleared.
bool drawDirActive = false;
bool drawDirShift = false;
bool drawDirCtrl = false;
//avoid re-assigning same cursor
uint currentCursor = 0; // enum AVAILABLECURSORS
ulong currentCursorFlavour; //for different flavours of a cursor (i.e. drawdir, pen and hilighter custom cursors)
bool drawDirCtrl = false;
// avoid re-assigning same cursor
guint currentCursor = 0; // enum AVAILABLECURSORS
gulong currentCursorFlavour; // for different flavours of a cursor (i.e. drawdir, pen and hilighter custom cursors)
};

Loading…
Cancel
Save